public class SubSequence<E> extends AbstractSequence<E> implements Sequence<E>
noInts 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 |
|---|
SubSequence () |
SubSequence (AbstractSequence<E> base) |
SubSequence (AbstractSequence<E> base,
int startPos,
int endPos) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear () |
int |
compare (int ipos1,
int ipos2)
Compare two positions, and indicate their relative order.
|
int |
createPos (int offset,
boolean isAfter)
Generate a position at a given index.
|
int |
createRelativePos (int pos,
int offset,
boolean isAfter) |
int |
endPos () |
void |
finalize () |
E |
get (int index)
See java.util.List.
|
protected int |
getIndexDifference (int ipos1,
int ipos0)
Get offset of (ipos1) relative to (ipos0).
|
int |
getNextKind (int ipos) |
java.lang.Object |
getPosNext (int ipos)
Get the element following the specified position.
|
java.lang.Object |
getPosPrevious (int ipos)
Get the element before the specified position.
|
protected boolean |
isAfterPos (int ipos)
Tests whether the position has the "isAfter" property.
|
protected int |
nextIndex (int ipos)
Get the offset from the beginning corresponding to a position cookie.
|
void |
releasePos (int ipos)
Reclaim any resources used by the given position int.
|
void |
removePosRange (int istart,
int iend)
Remove a range where each end-point is a position in a container.
|
int |
size ()
See java.util.List.
|
int |
startPos () |
protected Sequence<E> |
subSequencePos (int ipos0,
int ipos1) |
add, add, addAll, addAll, addPos, asImmutable, badRank, boundedHash, checkCanWrite, checkRank, compare, compare, consume, consume, consumeNext, consumePosRange, contains, containsAll, copyPos, effectiveIndex, effectiveIndex, effectiveIndex, effectiveIndex, effectiveIndex, elements, equals, equals, fill, fill, fillPosRange, firstAttributePos, firstChildPos, firstChildPos, fromEndIndex, get, get, get, get, getAttribute, getAttributeLength, getBooleanRaw, getByteRaw, getCharRaw, getContainingSequenceSize, getDoubleRaw, getElementKind, getFloatRaw, getInt, getInt, getInt, getInt, getInt, getIntRaw, getIterator, getIterator, getIteratorAtPos, getLongRaw, getLowBound, getNextTypeName, getNextTypeObject, getRaw, getRowMajor, getShortRaw, getSize, 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, setAt, setBuffer, setPosNext, setPosPrevious, setRaw, stableCompare, subList, subSequence, toArray, toArray, toString, toString, unsupported, unsupportedException clone, getClass, hashCode, notify, notifyAll, wait, wait, waitadd, add, addAll, addAll, contains, containsAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, sort, spliterator, subList, toArray, toArrayparallelStream, removeIf, streamforEachconsume boundedHash public SubSequence()
public SubSequence(AbstractSequence<E> base, int startPos, int endPos)
public SubSequence(AbstractSequence<E> base)
public int size()
Sequence public void removePosRange(int istart, int iend)
AbstractSequence removePosRange in class AbstractSequence<E>istart - start of range, as a poistioniend - end of rangeprotected boolean isAfterPos(int ipos)
AbstractSequence isAfterPos in class AbstractSequence<E>public int createPos(int offset, boolean isAfter)
AbstractSequence createPos in class AbstractSequence<E>offset - offset from beginning of desired positionisAfter - should the position have the isAfter propertypublic int createRelativePos(int pos, int offset, boolean isAfter)
createRelativePos in class AbstractSequence<E>protected int getIndexDifference(int ipos1, int ipos0)
AbstractSequence getIndexDifference in class AbstractSequence<E>public void releasePos(int ipos)
AbstractSequence releasePos in class AbstractSequence<E>ipos - the Pos being free'd.protected int nextIndex(int ipos)
AbstractSequence nextIndex in class AbstractSequence<E>public int compare(int ipos1, int ipos2)
AbstractSequence compare in class AbstractSequence<E>public java.lang.Object getPosNext(int ipos)
AbstractSequence getPosNext in class AbstractSequence<E>ipos - the specified position.public int getNextKind(int ipos)
getNextKind in class AbstractSequence<E>public int startPos()
startPos in class AbstractSequence<E>public int endPos()
endPos in class AbstractSequence<E>public java.lang.Object getPosPrevious(int ipos)
AbstractSequence getPosPrevious in class AbstractSequence<E>ipos - the specified position.protected Sequence<E> subSequencePos(int ipos0, int ipos1)
subSequencePos in class AbstractSequence<E>public void clear()
clear in interface java.util.Collection<E>clear in interface java.util.List<E>clear in class AbstractSequence<E>public void finalize()
finalize in class java.lang.Object