Class CharArraySequence
java.lang.Object
jodd.util.CharArraySequence
- All Implemented Interfaces:
CharSequence
Simple
CharSequence wrapper of the char array.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final char[]static final CharSequenceprivate final intprivate final int -
Constructor Summary
ConstructorsModifierConstructorDescriptionCharArraySequence(char[] value) CharArraySequence(char[] value, int offset, int length) privateCharArraySequence(int offset, int length, char[] value) Ctor without the bounds check. -
Method Summary
Modifier and TypeMethodDescriptioncharcharAt(int index) static CharArraySequencefrom(char[] value, int offset, int len) Static constructor that creates a char sequence by making a copy of provided char array.intlength()static CharArraySequenceof(char... value) Static constructor that creates a char sequence using provided char array.static CharArraySequenceof(char[] value, int offset, int len) subSequence(int start, int end) toString()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface CharSequence
chars, codePoints, getChars, isEmpty
-
Field Details
-
EMPTY
-
buffer
private final char[] buffer -
off
private final int off -
len
private final int len
-
-
Constructor Details
-
CharArraySequence
public CharArraySequence(char[] value) -
CharArraySequence
public CharArraySequence(char[] value, int offset, int length) -
CharArraySequence
private CharArraySequence(int offset, int length, char[] value) Ctor without the bounds check.
-
-
Method Details
-
of
Static constructor that creates a char sequence using provided char array. -
of
-
from
Static constructor that creates a char sequence by making a copy of provided char array. -
length
public int length()- Specified by:
lengthin interfaceCharSequence
-
toString
- Specified by:
toStringin interfaceCharSequence- Overrides:
toStringin classObject
-
charAt
public char charAt(int index) - Specified by:
charAtin interfaceCharSequence
-
subSequence
- Specified by:
subSequencein interfaceCharSequence
-