public class StringRingBuffer
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected char[] |
data |
protected boolean |
isFillingUp |
protected int |
next |
| Constructor and Description |
|---|
StringRingBuffer(int size) |
| Modifier and Type | Method and Description |
|---|---|
int |
add(char obj)
Returns the element that gets overwritten by this add-operation,
-1 if none is overwritten since the RingBuffer is
still filling up (that is, isFillingUp is true. |
boolean |
equals(java.lang.String other) |
char[] |
getAll() |
int |
size() |
java.lang.String |
toString() |
protected char[] data
protected int next
protected boolean isFillingUp
public int add(char obj)
-1 if none is overwritten since the RingBuffer is
still filling up (that is, isFillingUp is true.public int size()
public char[] getAll()
public boolean equals(java.lang.String other)
public java.lang.String toString()
toString in class java.lang.Object