public class SubCharSeq extends SubSequence implements CharSeq
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
Constructor and Description |
---|
SubCharSeq(AbstractSequence base,
int startPos,
int endPos) |
Modifier and Type | Method and Description |
---|---|
char |
charAt(int index) |
void |
consume(int start,
int count,
Consumer out) |
void |
fill(char value)
Set all the elements to a given character.
|
void |
fill(int fromIndex,
int toIndex,
char value) |
void |
getChars(int srcBegin,
int srcEnd,
char[] dst,
int dstBegin)
Copy characters into a destination buffer.
|
int |
length()
Get length of string, in characters.
|
void |
setCharAt(int index,
char ch) |
java.util.List |
subList(int fromIx,
int toIx) |
java.lang.CharSequence |
subSequence(int start,
int end) |
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 . |
clear, compare, createPos, createRelativePos, endPos, finalize, get, getIndexDifference, getNextKind, getPosNext, getPosPrevious, isAfterPos, nextIndex, releasePos, removePosRange, size, startPos, subSequencePos
add, add, addAll, addAll, addPos, compare, compare, consume, consumeNext, consumePosRange, contains, containsAll, copyPos, elements, equals, equals, fill, fill, fillPosRange, firstAttributePos, firstChildPos, firstChildPos, fromEndIndex, get, getAttribute, getAttributeLength, getContainingSequenceSize, getEffectiveIndex, getIterator, getIterator, getIteratorAtPos, getLowBound, getNextTypeName, getNextTypeObject, getSize, gotoAttributesStart, gotoChildrenStart, gotoParent, hashCode, hasNext, hasPrevious, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, nextIndex, nextMatching, nextPos, parentPos, previousPos, rank, remove, remove, removeAll, removePos, retainAll, set, set, setPosNext, setPosPrevious, stableCompare, subSequence, toArray, toArray, toString, unsupported, unsupportedException
clone, equals, getClass, notify, notifyAll, wait, wait, wait
add, add, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, toArray, toArray
consume
public SubCharSeq(AbstractSequence base, int startPos, int endPos)
public int length()
public char charAt(int index)
public void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin)
public void fill(char value)
public void fill(int fromIndex, int toIndex, char value)
public void writeTo(int start, int count, java.lang.Appendable dest) throws java.io.IOException
CharSeq
Appendable
.
An allowable implementation is:
dest.append(this, start, start+count)
.
Hence implementors of Appendable
should avoid calling
writeTo
- though they can call getChars
.public void writeTo(java.lang.Appendable dest) throws java.io.IOException
public void consume(int start, int count, Consumer out)
public java.lang.String toString()
toString
in interface CharSeq
toString
in interface java.lang.CharSequence
toString
in class AbstractSequence
public java.util.List subList(int fromIx, int toIx)
subList
in interface java.util.List
subList
in class AbstractSequence
public java.lang.CharSequence subSequence(int start, int end)
subSequence
in interface CharSeq
subSequence
in interface java.lang.CharSequence