|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.sadun.util.RotationalCharBuffer
A rotational character buffer.
| Constructor Summary | |
RotationalCharBuffer(int length)
Create a buffer with the given lenght. |
|
| Method Summary | |
void |
addToLeft(char c)
Add a character to the left of the current position. |
void |
addToLeft(java.lang.String s)
Invoke addToLeft(char)on an entire string, one character at a
time, starting from the left. |
void |
addToRight(char c)
Add a character to the right of the current position. |
void |
addToRight(java.lang.String s)
Invoke addToRight(char)on an entire string, one character at a
time, starting from the left. |
boolean |
equals(java.lang.Object obj)
|
int |
size()
Return the size of the buffer. |
java.lang.String |
toString()
Return a string image of the buffer. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public RotationalCharBuffer(int length)
length - the lenght of the buffer| Method Detail |
public void addToRight(char c)
The characters on the left are shifted one position and the leftmost discarded, if needed.
c - the character to addpublic void addToRight(java.lang.String s)
addToRight(char)on an entire string, one character at a
time, starting from the left.
s - the string to add.public void addToLeft(char c)
The characters on the right are shifted one position and the rightmost discarded, if needed.
c - the character to addpublic void addToLeft(java.lang.String s)
addToLeft(char)on an entire string, one character at a
time, starting from the left.
s - the string to add.public int size()
public java.lang.String toString()
public boolean equals(java.lang.Object obj)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||