public static class CombinedWordRule.CharacterBuffer
extends java.lang.Object
| Constructor and Description |
|---|
CharacterBuffer(int capacity)
Initialize with the given capacity.
|
CharacterBuffer(java.lang.String content)
Initialize with the given content.
|
| Modifier and Type | Method and Description |
|---|---|
void |
append(char c)
Appends the given character to the buffer.
|
char |
charAt(int i)
Returns the character at the given position.
|
void |
clear()
Empties this buffer.
|
boolean |
equals(java.lang.Object obj) |
boolean |
equals(java.lang.String string)
Is the content equal to the given string?
|
int |
hashCode() |
int |
length()
Returns the length of the content.
|
java.lang.String |
toString()
Returns the content as string.
|
public CharacterBuffer(int capacity)
capacity - the initial capacitypublic CharacterBuffer(java.lang.String content)
content - the initial contentpublic void clear()
public void append(char c)
c - the characterpublic int length()
public java.lang.String toString()
toString in class java.lang.Objectpublic char charAt(int i)
i - the positionipublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic boolean equals(java.lang.String string)
string - the stringtrue iff the content is the same character sequence as in the string