Class CharacterRing
java.lang.Object
org.ojalgo.netio.CharacterRing
- All Implemented Interfaces:
Appendable, CharSequence, BasicLogger.Buffer
public final class CharacterRing
extends Object
implements CharSequence, Appendable, BasicLogger.Buffer
A circular char buffer - an Appendable CharSequence that always hold exactly
65536 characters. Whenever you append something the oldest entry gets overwritten.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic intprivate final char[]private char -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionappend(char c) append(CharSequence csq) append(CharSequence csq, int start, int end) charcharAt(int index) voidclear()booleanvoidflush(Appendable receiver) voidflush(BasicLogger receiver) (package private) charinthashCode()intindexOfFirst(char c) intindexOfLast(char c) intlength()static CharacterRing.RingLoggersubSequence(int start, int end) toString()Methods inherited from interface CharSequence
chars, codePoints, getChars, isEmpty
-
Field Details
-
length
public static int length -
myCharacters
private final char[] myCharacters -
myCursor
private char myCursor
-
-
Constructor Details
-
CharacterRing
public CharacterRing()
-
-
Method Details
-
newRingLogger
-
append
- Specified by:
appendin interfaceAppendable- Throws:
IOException
-
append
- Specified by:
appendin interfaceAppendable- Throws:
IOException
-
append
- Specified by:
appendin interfaceAppendable- Throws:
IOException
-
charAt
public char charAt(int index) - Specified by:
charAtin interfaceCharSequence
-
clear
public void clear()- Specified by:
clearin interfaceBasicLogger.Buffer
-
equals
-
flush
- Specified by:
flushin interfaceBasicLogger.Buffer
-
flush
- Specified by:
flushin interfaceBasicLogger.Buffer
-
hashCode
-
indexOfFirst
public int indexOfFirst(char c) -
indexOfLast
public int indexOfLast(char c) -
length
public int length()- Specified by:
lengthin interfaceCharSequence
-
subSequence
- Specified by:
subSequencein interfaceCharSequence
-
toString
- Specified by:
toStringin interfaceCharSequence- Overrides:
toStringin classObject
-
getCursor
char getCursor()
-