net.percederberg.grammatica.parser.re
Class CharBuffer

java.lang.Object
  extended by net.percederberg.grammatica.parser.re.CharBuffer

Deprecated. The CharBuffer class has been deprecated in favor of ReaderBuffer as of version 1.5.

public class CharBuffer
extends java.lang.Object

A character buffer. This class provides an API identical to StringBuffer, with the exception that none of the methods in this class are synchronized.


Constructor Summary
CharBuffer()
          Deprecated. Creates a new character buffer.
CharBuffer(int initialSize)
          Deprecated. Creates a new character buffer with the specified initial size.
CharBuffer(java.lang.String str)
          Deprecated. Creates a new character buffer from the specified string.
CharBuffer(java.lang.StringBuffer str)
          Deprecated. Creates a new character buffer from the specified string buffer.
 
Method Summary
 CharBuffer append(boolean b)
          Deprecated. Appends the string representation of a boolean value to the end of the buffer.
 CharBuffer append(char c)
          Deprecated. Appends a character to the end of the buffer.
 CharBuffer append(char[] str)
          Deprecated. Appends a character array to the end of the buffer.
 CharBuffer append(char[] str, int offset, int length)
          Deprecated. Appends a character array to the end of the buffer.
 CharBuffer append(double d)
          Deprecated. Appends the string representation of a double value to the end of the buffer.
 CharBuffer append(float f)
          Deprecated. Appends the string representation of a float value to the end of the buffer.
 CharBuffer append(int i)
          Deprecated. Appends the string representation of an int value to the end of the buffer.
 CharBuffer append(long l)
          Deprecated. Appends the string representation of a long value to the end of the buffer.
 CharBuffer append(java.lang.Object obj)
          Deprecated. Appends the string representation of an object to the end of the buffer.
 CharBuffer append(java.lang.String str)
          Deprecated. Appends a string to the end of the buffer.
 CharBuffer append(java.lang.StringBuffer str)
          Deprecated. Appends a string buffer to the end of the buffer.
 char charAt(int index)
          Deprecated. Returns a character in the buffer.
 CharBuffer delete(int start, int end)
          Deprecated. Removes characters from this buffer.
 void ensureCapacity(int size)
          Deprecated. Ensures that this buffer has at least the specified capacity.
 int length()
          Deprecated. Returns the number of characters in the buffer.
 java.lang.String substring(int start)
          Deprecated. Returns a string containing a sequence of characters from this buffer.
 java.lang.String substring(int start, int end)
          Deprecated. Returns a string containing a sequence of characters from this buffer.
 java.lang.String toString()
          Deprecated. Returns a string containing all character in this buffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CharBuffer

public CharBuffer()
Deprecated. 
Creates a new character buffer.


CharBuffer

public CharBuffer(int initialSize)
Deprecated. 
Creates a new character buffer with the specified initial size.

Parameters:
initialSize - the initial size of the buffer

CharBuffer

public CharBuffer(java.lang.String str)
Deprecated. 
Creates a new character buffer from the specified string.

Parameters:
str - the string to copy

CharBuffer

public CharBuffer(java.lang.StringBuffer str)
Deprecated. 
Creates a new character buffer from the specified string buffer.

Parameters:
str - the string buffer to copy
Method Detail

append

public CharBuffer append(boolean b)
Deprecated. 
Appends the string representation of a boolean value to the end of the buffer.

Parameters:
b - the boolean value to append
Returns:
this character buffer

append

public CharBuffer append(char c)
Deprecated. 
Appends a character to the end of the buffer.

Parameters:
c - the character to append
Returns:
this character buffer

append

public CharBuffer append(char[] str)
Deprecated. 
Appends a character array to the end of the buffer.

Parameters:
str - the characters to append
Returns:
this character buffer

append

public CharBuffer append(char[] str,
                         int offset,
                         int length)
Deprecated. 
Appends a character array to the end of the buffer.

Parameters:
str - the character array to append
offset - the starting position in the array
length - the number of characters to copy
Returns:
this character buffer

append

public CharBuffer append(double d)
Deprecated. 
Appends the string representation of a double value to the end of the buffer.

Parameters:
d - the double value to append
Returns:
this character buffer

append

public CharBuffer append(float f)
Deprecated. 
Appends the string representation of a float value to the end of the buffer.

Parameters:
f - the float value to append
Returns:
this character buffer

append

public CharBuffer append(int i)
Deprecated. 
Appends the string representation of an int value to the end of the buffer.

Parameters:
i - the int value to append
Returns:
this character buffer

append

public CharBuffer append(long l)
Deprecated. 
Appends the string representation of a long value to the end of the buffer.

Parameters:
l - the long value to append
Returns:
this character buffer

append

public CharBuffer append(java.lang.Object obj)
Deprecated. 
Appends the string representation of an object to the end of the buffer.

Parameters:
obj - the object to append
Returns:
this character buffer

append

public CharBuffer append(java.lang.String str)
Deprecated. 
Appends a string to the end of the buffer.

Parameters:
str - the string to append
Returns:
this character buffer

append

public CharBuffer append(java.lang.StringBuffer str)
Deprecated. 
Appends a string buffer to the end of the buffer.

Parameters:
str - the string buffer to append
Returns:
this character buffer

charAt

public char charAt(int index)
            throws java.lang.StringIndexOutOfBoundsException
Deprecated. 
Returns a character in the buffer.

Parameters:
index - the character position, 0 <= index < length
Returns:
the character found
Throws:
java.lang.StringIndexOutOfBoundsException - if the character position was negative or higher or equal to the buffer length

delete

public CharBuffer delete(int start,
                         int end)
                  throws java.lang.StringIndexOutOfBoundsException
Deprecated. 
Removes characters from this buffer.

Parameters:
start - the starting position (inclusive)
end - the ending position (exclusive)
Returns:
this character buffer
Throws:
java.lang.StringIndexOutOfBoundsException - if the start or end indexes were out of bounds

ensureCapacity

public void ensureCapacity(int size)
Deprecated. 
Ensures that this buffer has at least the specified capacity.

Parameters:
size - the minimum buffer size

length

public int length()
Deprecated. 
Returns the number of characters in the buffer.

Returns:
the length of the buffer

substring

public java.lang.String substring(int start)
                           throws java.lang.StringIndexOutOfBoundsException
Deprecated. 
Returns a string containing a sequence of characters from this buffer.

Parameters:
start - the start index, inclusive
Returns:
the new substring
Throws:
java.lang.StringIndexOutOfBoundsException - if the start index was negative, or higher than the length of the string

substring

public java.lang.String substring(int start,
                                  int end)
                           throws java.lang.StringIndexOutOfBoundsException
Deprecated. 
Returns a string containing a sequence of characters from this buffer.

Parameters:
start - the start index, inclusive
end - end end index, exclusive
Returns:
the new substring
Throws:
java.lang.StringIndexOutOfBoundsException - if the start index was negative, or higher than the length of the string

toString

public java.lang.String toString()
Deprecated. 
Returns a string containing all character in this buffer.

Overrides:
toString in class java.lang.Object
Returns:
a string containing the characters in this buffer