public interface CharSeq extends java.lang.CharSequence, Sequence<Char>, Consumable
ATTRIBUTE_VALUE, BOOLEAN_VALUE, CDATA_VALUE, CHAR_VALUE, COMMENT_VALUE, DOCUMENT_VALUE, DOUBLE_VALUE, ELEMENT_VALUE, EOF_VALUE, eofValue, FLOAT_VALUE, INT_S16_VALUE, INT_S32_VALUE, INT_S64_VALUE, INT_S8_VALUE, INT_U16_VALUE, INT_U32_VALUE, INT_U64_VALUE, INT_U8_VALUE, OBJECT_VALUE, PRIM_VALUE, PROCESSING_INSTRUCTION_VALUE, TEXT_BYTE_VALUE
Modifier and Type | Method and Description |
---|---|
char |
charAt(int index)
The index is in terms of code units.
|
void |
getChars(int srcBegin,
int srcEnd,
char[] dst,
int dstBegin)
Copy characters into a destination buffer.
|
int |
length()
Get length of string, in code units (not characters).
|
void |
setCharacterAt(int index,
int ch) |
void |
setCharAt(int index,
char ch) |
java.lang.String |
toString() |
void |
writeTo(java.lang.Appendable dest) |
void |
writeTo(int start,
int count,
java.lang.Appendable dest)
Append a specified subsequence to an
Appendable . |
add, add, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, sort, spliterator, subList, toArray, toArray
consume
boundedHash
int length()
length
in interface java.lang.CharSequence
char charAt(int index)
charAt
in interface java.lang.CharSequence
void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin)
srcBegin
- source start position, in 16-bit code units.srcEnd
- source end position, in 16-bit code units.dst
- destinationdstBegin
- index (in code units) in dst arrayvoid setCharAt(int index, char ch)
void setCharacterAt(int index, int ch)
void writeTo(int start, int count, java.lang.Appendable dest) throws java.io.IOException
Appendable
.
An allowable implementation is:
dest.append(this, start, start+count)
.
Hence implementors of Appendable
should avoid calling
writeTo
- though they can call getChars
.java.io.IOException
void writeTo(java.lang.Appendable dest) throws java.io.IOException
java.io.IOException
java.lang.String toString()
toString
in interface java.lang.CharSequence
toString
in class java.lang.Object