Package gnu.lists
Class TreeList
- java.lang.Object
-
- gnu.lists.AbstractSequence<Object>
-
- gnu.lists.TreeList
-
- All Implemented Interfaces:
Consumable,Consumer,PositionConsumer,XConsumer,Appendable,Consumer<Object>,DoubleConsumer,IntConsumer,LongConsumer
- Direct Known Subclasses:
NodeTree
public class TreeList extends AbstractSequence<Object> implements Appendable, XConsumer, PositionConsumer, Consumable
A compact representation of a tree, that is a nested list structure. The data structure can store anything that can be emitted to a Consumer. This data structure is optimized for efficient forwards traversal through the data structure, not random access. It does have an "insertion point"; insertions and deletions are efficient through the use of a buffer gap. It is a reasonable choice for a "DOM" for XML data.
-
-
Field Summary
Fields Modifier and Type Field Description intattrStartIf non-zero, gap is in an attribute starting (1 less than) here.protected static intBEGIN_ATTRIBUTE_LONGThe beginning of an attribute.static intBEGIN_ATTRIBUTE_LONG_SIZEprotected static intBEGIN_DOCUMENTBeginning of a document (or top-level value).protected static intBEGIN_ELEMENT_LONGBegin of an element, non-compact form.protected static intBEGIN_ELEMENT_SHORTBeginning of an element, compact form.protected static intBEGIN_ELEMENT_SHORT_INDEX_MAXstatic intBEGIN_ENTITYStart of an entity (typically a file, possibly included).static intBEGIN_ENTITY_SIZEchar[]dataintdocStartIf non-zero, gap is in an document starting (1 less than) here.protected static intDOCUMENT_URIThe document-uri property of a node.static intEND_ATTRIBUTE_SIZEprotected static intEND_DOCUMENTEnd of a document.protected static intEND_ELEMENT_LONGEnd of n element, non-compact form.protected static intEND_ELEMENT_SHORTEnd of an element, compact form.protected static intEND_ENTITYintgapEndintgapStartstatic intINT_FOLLOWSA 32-bit integer, non-compact form.static intMAX_CHAR_SHORTThe largest Unicode character that can be encoded in one char.Object[]objectsintoindexprotected static charPOSITION_PAIR_FOLLOWSA position triple referencing some other "nodes".protected static intPROCESSING_INSTRUCTIONA processing-instruction node follows.-
Fields inherited from class gnu.lists.AbstractSequence
noInts
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Consumerappend(char c)Consumerappend(CharSequence csq)Consumerappend(CharSequence csq, int start, int end)voidbeginEntity(Object base)voidclear()intcompare(int ipos1, int ipos2)Compare two positions, and indicate their relative order.voidconsume(Consumer out)intconsumeIRange(int startPosition, int endPosition, Consumer out)booleanconsumeNext(int ipos, Consumer out)Copy an element specified by a position pair to a Consumer.voidconsumePosRange(int startPos, int endPos, Consumer out)intcreatePos(int index, boolean isAfter)Generate a position at a given index.intcreateRelativePos(int istart, int offset, boolean isAfter)ObjectdocumentUriOfPos(int pos)voiddump()voiddump(PrintWriter out)voiddump(PrintWriter out, int start, int limit)voidendAttribute()End of an attribute or end of an actual parameter.voidendDocument()voidendElement()voidendEntity()voidensureSpace(int needed)intfind(Object arg1)intfirstAttributePos(int ipos)Like firstChildPos.intfirstChildPos(int ipos)Get position before first child (of the element following position).Objectget(int index)intgetAttributeCount(int parent)protected intgetIndexDifference(int ipos1, int ipos0)Get offset of (ipos1) relative to (ipos0).protected intgetIntN(int index)Get a 32-bit int from the data array.protected longgetLongN(int index)Get a 64-bit long from the data array.intgetNextKind(int ipos)intgetNextKindI(int index)ObjectgetNextTypeObject(int ipos)ObjectgetPosNext(int ipos)Get the element following the specified position.intgetPosNextInt(int ipos)Return following value (like getPosNext), as an integer.ObjectgetPosPrevious(int ipos)Get the element before the specified position.intgotoAttributesStart(int index)booleangotoAttributesStart(TreePosition pos)intgotoChildrenStart(int index)inthashCode()booleanhasNext(int ipos)booleanignoring()True if consumer is ignoring rest of element.booleanisEmpty()intnextDataIndex(int pos)intnextIndex(int ipos)Get the offset from the beginning corresponding to a position cookie.intnextMatching(int startPos, ItemPredicate predicate, int endPos, boolean descend)Get next matching child or descendent (ignoring attributes).intnextNodeIndex(int pos, int limit)Skip all primitive content nodes.intnextPos(int position)Return the next position following the argument.intparentOrEntityI(int index)intparentOrEntityPos(int ipos)intparentPos(int ipos)Get position of parent.intposToDataIndex(int ipos)voidreserveObjects(int needed)voidsetAttributeName(int attrIndex, int nameIndex)voidsetElementName(int elementIndex, int nameIndex)voidsetIntN(int index, int i)intsize()voidstartAttribute(int index)voidstartAttribute(Object attrType)Write a attribute for the current element.voidstartDocument()voidstartElement(int index)voidstartElement(Object type)voidstatistics()voidstatistics(PrintWriter out)intstringValue(boolean inElement, int index, StringBuffer sbuf)voidstringValue(int startIndex, int endIndex, StringBuffer sbuf)intstringValue(int index, StringBuffer sbuf)voidtoString(String sep, StringBuffer sbuf)voidwrite(char[] buf, int off, int len)voidwrite(int c)voidwrite(CharSequence str, int start, int length)voidwrite(String str)voidwriteBoolean(boolean v)voidwriteByte(int v)voidwriteCDATA(char[] chars, int offset, int length)voidwriteComment(char[] chars, int offset, int length)voidwriteComment(String comment, int offset, int length)voidwriteDocumentUri(Object uri)Write/set the document-uri property of the current document.voidwriteDouble(double v)voidwriteFloat(float v)voidwriteInt(int v)voidwriteIntForce32(int v)voidwriteJoiner()voidwriteLong(long v)voidwriteObject(Object v)voidwritePosition(AbstractSequence seq, int ipos)Consume a single position pair.voidwritePosition(SeqPosition position)Consume node at current position.voidwriteProcessingInstruction(String target, char[] content, int offset, int length)voidwriteProcessingInstruction(String target, String content, int offset, int length)-
Methods inherited from class gnu.lists.AbstractSequence
add, add, addAll, addAll, addPos, asImmutable, badRank, boundedHash, checkCanWrite, checkRank, compare, compare, consume, contains, containsAll, copyPos, effectiveIndex, effectiveIndex, effectiveIndex, effectiveIndex, effectiveIndex, elements, endPos, equals, equals, fill, fill, fillPosRange, 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, getRaw, getRowMajor, getShortRaw, getSize, getSize, gotoChildrenStart, gotoParent, hasPrevious, indexOf, isAfterPos, iterator, lastIndexOf, listIterator, listIterator, nextIndex, previousPos, rank, releasePos, remove, remove, removeAll, removePos, removePosRange, retainAll, set, set, setAt, setBuffer, setPosNext, setPosPrevious, setRaw, stableCompare, startPos, subList, subSequence, subSequencePos, toArray, toArray, toString, unsupported, unsupportedException
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.function.DoubleConsumer
andThen
-
Methods inherited from interface java.util.function.IntConsumer
andThen
-
Methods inherited from interface java.util.function.LongConsumer
andThen
-
-
-
-
Field Detail
-
objects
public Object[] objects
-
oindex
public int oindex
-
data
public char[] data
-
gapStart
public int gapStart
-
gapEnd
public int gapEnd
-
attrStart
public int attrStart
If non-zero, gap is in an attribute starting (1 less than) here.
-
docStart
public int docStart
If non-zero, gap is in an document starting (1 less than) here.
-
MAX_CHAR_SHORT
public static final int MAX_CHAR_SHORT
The largest Unicode character that can be encoded in one char.- See Also:
- Constant Field Values
-
POSITION_PAIR_FOLLOWS
protected static final char POSITION_PAIR_FOLLOWS
A position triple referencing some other "nodes". Followed by index of sequence (2 chars), and ipos (2 chars).- See Also:
- Constant Field Values
-
INT_FOLLOWS
public static final int INT_FOLLOWS
A 32-bit integer, non-compact form. [INT_FOLLOWS] [word1], [word2]: The big-endian bits of the integer.- See Also:
- Constant Field Values
-
PROCESSING_INSTRUCTION
protected static final int PROCESSING_INSTRUCTION
A processing-instruction node follows. [PROCESSING_INSTRUCTION] [target] 2 shorts, where objects[target] is the target as a String. [length] 2 shorts. [comment text], (length) number of characters.- See Also:
- Constant Field Values
-
BEGIN_ATTRIBUTE_LONG
protected static final int BEGIN_ATTRIBUTE_LONG
The beginning of an attribute. [BEGIN_ATTRIBUTE_LONG] [index], 2 shorts, where objects[index] is the attribute type name and objects[index+1] is the attribute type object. [end_offset], 2 shorts, giving the location of the following END_ATTRIBUTE. If the attribute straddles the gap, then end_offset is a negative offset relative to data.length. (Therefore allocating more space for the gap does not require adjusting end_offset.) Otherwise, the end_offset is relative to the BEGIN_ATTRIBUTE_LONG word.- See Also:
- Constant Field Values
-
BEGIN_ATTRIBUTE_LONG_SIZE
public static final int BEGIN_ATTRIBUTE_LONG_SIZE
- See Also:
- Constant Field Values
-
END_ATTRIBUTE_SIZE
public static final int END_ATTRIBUTE_SIZE
- See Also:
- Constant Field Values
-
BEGIN_DOCUMENT
protected static final int BEGIN_DOCUMENT
Beginning of a document (or top-level value). Used to distinguish a document from its element node. [end_offset], 2 shorts, giving the location of the following END_DOCUMENT. If the attribute straddles the gap, then end_offset is a negative offset relative to data.length. (Therefore allocating more space for the gap does not require adjusting end_offset.) Otherwise, the end_offset is relative to the BEGIN_DOCUMENT word. [parent_offset], in 2 shorts. The parent node, or -1 if no parent. Otherwise, a negative value is a relative offset, while a non-negative value is absolute. (Use the latter when gap is between this node and its parent. The parent would normally be a BEGIN_ENTITY.- See Also:
- Constant Field Values
-
END_DOCUMENT
protected static final int END_DOCUMENT
End of a document.- See Also:
- Constant Field Values
-
BEGIN_ENTITY
public static final int BEGIN_ENTITY
Start of an entity (typically a file, possibly included). [base_uri], 2 shorts, given an index of a base-uri object [parent_offset], in 2 shorts, encoded as for BEGIN_DOCUMENT.- See Also:
- Constant Field Values
-
BEGIN_ENTITY_SIZE
public static final int BEGIN_ENTITY_SIZE
- See Also:
- Constant Field Values
-
END_ENTITY
protected static final int END_ENTITY
- See Also:
- Constant Field Values
-
DOCUMENT_URI
protected static final int DOCUMENT_URI
The document-uri property of a node. This is not an actual value, but it is a property of the previous document node, or the surrounding node just after a BEGIN_XXX entry. [DOCUMENT_URI] [index]. 2 shorts, where objects[index] is the document-uri value.- See Also:
- Constant Field Values
-
BEGIN_ELEMENT_SHORT
protected static final int BEGIN_ELEMENT_SHORT
Beginning of an element, compact form. [BEGIN_ELEMENT_SHORT + index], where objects[index] is the element's type name and objects[index+1] is the type object. [end_offset], the unsigned offset (from the initial word) to the corresponding END_ELEMENT_SHORT. [parent_offset], the (unsigned absolute value of the) offset to the outer BEGIN_ELEMENT_SHORT/BEGIN_ELEMENT_LONG/BEGIN_DOCUMENT. . (If these is no parent, then parent_offset==0.) This should is used whenindex < BEGIN_ELEMENT_SHORT_INDEX_MAX, both end_offset and parent_offset fit in 16 bits, and the element does not straddle the gap.- See Also:
- Constant Field Values
-
BEGIN_ELEMENT_SHORT_INDEX_MAX
protected static final int BEGIN_ELEMENT_SHORT_INDEX_MAX
- See Also:
- Constant Field Values
-
END_ELEMENT_SHORT
protected static final int END_ELEMENT_SHORT
End of an element, compact form. [END_ELEMENT_SHORT] [begin_offset], the unsigned absolute value of the offset to the matching BEGIN. (This is the same as the matching end_offset.)- See Also:
- Constant Field Values
-
BEGIN_ELEMENT_LONG
protected static final int BEGIN_ELEMENT_LONG
Begin of an element, non-compact form. [BEGIN_ELEMENT_LONG] [end_offset], in 2 shorts. The position of the matching END_ELEMENT_LONG. If the element straddles the gap, then end_offset is a negative offset relative to data.length. (Therefore allocating more space for the gap does not require adjusting any end_offset.) If the element and and its children are all on the same side of the gap, then end_offset is a positive offset relative to the BEGIN_ELEMENT_LONG word. (Hence shifting an entire element when the gap is moved does not require changing its end_offset.) Note that the space taken by a BEGIN_ELEMENT_LONG is the same that needed for a BEGIN_ELEMENT_SHORT (but a END_ELEMENT_LONG takes much more space than a END_ELEMENT_SHORT). This is to make it easier to convert a BEGIN_ELEMENT_LONG to a BEGIN_ELEMENT_SHORT or vice versa, as needed.- See Also:
- Constant Field Values
-
END_ELEMENT_LONG
protected static final int END_ELEMENT_LONG
End of n element, non-compact form. [END_ELEMENT_LONG] [index], 2 shorts where objects[index] is the element's type name and objects[index+1] is the type object. [begin_offset], in 2 shorts. The position of the matching BEGIN_ELEMENT_LONG. If the element straddles the gap, then begin_offset is the actual index (i.e. relative to the start of data) of the matching BEGIN_ELEMENT_LONG. (Therefore allocating more space for the gap does not require adjusting begin_offset.) If the element does not straddle the gap, then begin_offset is a negative offset relative to the END_ELEMENT_LONG word. (Hence shifting an entire element when the gap is moved does not require changing its begin_offset.) relative to data.length. [parent_offset], in 2 shorts. The position of the outer BEGIN_ELEMENT_LONG, BEGIN_ELEMENT_SHORT or BEGIN_DOCUMENT. If the difference straddles the gap (i.e. either this element straddles the gap or the parent element does and the gap precedes this element), then parent_offset is the actual index of the parent element. Otherwise, then parent_offset is a negative offset relative to the END_ELEMENT_LONG word.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TreeList
public TreeList()
-
TreeList
public TreeList(TreeList list, int startPosition, int endPosition)
Make a copy of a sub-range of a TreeList.- Parameters:
list- the TreeList to copystartPosition- start of range, as a raw index in dataendPosition- end of range, as a raw index in data
-
TreeList
public TreeList(TreeList list)
-
-
Method Detail
-
clear
public void clear()
- Overrides:
clearin classAbstractSequence<Object>
-
ensureSpace
public void ensureSpace(int needed)
-
reserveObjects
public final void reserveObjects(int needed)
-
find
public int find(Object arg1)
-
getIntN
protected final int getIntN(int index)
Get a 32-bit int from the data array.
-
getLongN
protected final long getLongN(int index)
Get a 64-bit long from the data array.
-
setIntN
public final void setIntN(int index, int i)
-
writePosition
public void writePosition(SeqPosition position)
Description copied from interface:PositionConsumerConsume node at current position. The caller may invalidate or change the position after consume returns, so if the consumer wants to save it, it needs to copy it.- Specified by:
writePositionin interfacePositionConsumer
-
writePosition
public void writePosition(AbstractSequence seq, int ipos)
Description copied from interface:PositionConsumerConsume a single position pair. This PositionConsumer may assume the sequence does no reference management; i.e. that copyPos is trivial and releasePos is a no-op. If that is not the case, use consume(TreePosition) instead.- Specified by:
writePositionin interfacePositionConsumer
-
writeObject
public void writeObject(Object v)
- Specified by:
writeObjectin interfaceConsumer
-
writeDocumentUri
public void writeDocumentUri(Object uri)
Write/set the document-uri property of the current document. Only allowed immediately following startDocument.
-
writeComment
public void writeComment(char[] chars, int offset, int length)- Specified by:
writeCommentin interfaceXConsumer
-
writeComment
public void writeComment(String comment, int offset, int length)
-
writeProcessingInstruction
public void writeProcessingInstruction(String target, char[] content, int offset, int length)
- Specified by:
writeProcessingInstructionin interfaceXConsumer
-
writeProcessingInstruction
public void writeProcessingInstruction(String target, String content, int offset, int length)
-
startElement
public void startElement(Object type)
- Specified by:
startElementin interfaceConsumer
-
startDocument
public void startDocument()
- Specified by:
startDocumentin interfaceConsumer
-
endDocument
public void endDocument()
- Specified by:
endDocumentin interfaceConsumer
-
beginEntity
public void beginEntity(Object base)
- Specified by:
beginEntityin interfaceXConsumer
-
startElement
public void startElement(int index)
-
setElementName
public void setElementName(int elementIndex, int nameIndex)
-
endElement
public void endElement()
- Specified by:
endElementin interfaceConsumer
-
startAttribute
public void startAttribute(Object attrType)
Description copied from interface:ConsumerWrite a attribute for the current element. This is only allowed immediately after a startElement.- Specified by:
startAttributein interfaceConsumer
-
startAttribute
public void startAttribute(int index)
-
setAttributeName
public void setAttributeName(int attrIndex, int nameIndex)
-
endAttribute
public void endAttribute()
Description copied from interface:ConsumerEnd of an attribute or end of an actual parameter. The former use matches a startAttribute; the latter may not, and can be used to separate parameters in a parameter list. This double duty suggsts the method should at least be re-named.- Specified by:
endAttributein interfaceConsumer
-
append
public Consumer append(char c)
- Specified by:
appendin interfaceAppendable- Specified by:
appendin interfaceConsumer
-
writeBoolean
public void writeBoolean(boolean v)
- Specified by:
writeBooleanin interfaceConsumer
-
writeByte
public void writeByte(int v)
-
writeIntForce32
public void writeIntForce32(int v)
-
writeFloat
public void writeFloat(float v)
- Specified by:
writeFloatin interfaceConsumer
-
writeDouble
public void writeDouble(double v)
- Specified by:
writeDoublein interfaceConsumer
-
ignoring
public boolean ignoring()
Description copied from interface:ConsumerTrue if consumer is ignoring rest of element. The producer can use this information to skip ahead.
-
writeJoiner
public void writeJoiner()
-
write
public void write(CharSequence str, int start, int length)
-
writeCDATA
public void writeCDATA(char[] chars, int offset, int length)- Specified by:
writeCDATAin interfaceXConsumer
-
append
public Consumer append(CharSequence csq)
- Specified by:
appendin interfaceAppendable- Specified by:
appendin interfaceConsumer
-
append
public Consumer append(CharSequence csq, int start, int end)
- Specified by:
appendin interfaceAppendable- Specified by:
appendin interfaceConsumer
-
isEmpty
public boolean isEmpty()
- Overrides:
isEmptyin classAbstractSequence<Object>
-
size
public int size()
- Overrides:
sizein classAbstractSequence<Object>
-
createPos
public int createPos(int index, boolean isAfter)Description copied from class:AbstractSequenceGenerate a position at a given index. The result is a position cookie that must be free'd with releasePos.- Overrides:
createPosin classAbstractSequence<Object>- Parameters:
index- offset from beginning of desired positionisAfter- should the position have the isAfter property
-
posToDataIndex
public final int posToDataIndex(int ipos)
-
firstChildPos
public int firstChildPos(int ipos)
Description copied from class:AbstractSequenceGet position before first child (of the element following position).- Overrides:
firstChildPosin classAbstractSequence<Object>- Parameters:
ipos- parent position. It is not released by this method.- Returns:
- non-zero position cookie if there is a child sequence (which might be empty); zero if current position is end of sequence or following element is atomic (cannot have children).
-
gotoChildrenStart
public final int gotoChildrenStart(int index)
-
parentPos
public int parentPos(int ipos)
Description copied from class:AbstractSequenceGet position of parent.- Overrides:
parentPosin classAbstractSequence<Object>- Parameters:
ipos- child position. It is not released by this method.- Returns:
- the p os of the parent, or endPos() is there is no known parent.
-
parentOrEntityPos
public int parentOrEntityPos(int ipos)
-
parentOrEntityI
public int parentOrEntityI(int index)
-
getAttributeCount
public int getAttributeCount(int parent)
-
gotoAttributesStart
public boolean gotoAttributesStart(TreePosition pos)
- Overrides:
gotoAttributesStartin classAbstractSequence<Object>
-
firstAttributePos
public int firstAttributePos(int ipos)
Description copied from class:AbstractSequenceLike firstChildPos. Problem: Should this stop before we get to children? I think so, but that requires changes to TreeList.- Overrides:
firstAttributePosin classAbstractSequence<Object>
-
gotoAttributesStart
public int gotoAttributesStart(int index)
-
get
public Object get(int index)
- Overrides:
getin classAbstractSequence<Object>
-
consumeNext
public boolean consumeNext(int ipos, Consumer out)Description copied from class:AbstractSequenceCopy an element specified by a position pair to a Consumer.- Overrides:
consumeNextin classAbstractSequence<Object>- Returns:
- if hasNext(ipos).
-
consumePosRange
public void consumePosRange(int startPos, int endPos, Consumer out)- Overrides:
consumePosRangein classAbstractSequence<Object>
-
consumeIRange
public int consumeIRange(int startPosition, int endPosition, Consumer out)
-
toString
public void toString(String sep, StringBuffer sbuf)
- Overrides:
toStringin classAbstractSequence<Object>
-
hasNext
public boolean hasNext(int ipos)
- Overrides:
hasNextin classAbstractSequence<Object>
-
getNextKind
public int getNextKind(int ipos)
- Overrides:
getNextKindin classAbstractSequence<Object>
-
getNextKindI
public int getNextKindI(int index)
-
getNextTypeObject
public Object getNextTypeObject(int ipos)
- Overrides:
getNextTypeObjectin classAbstractSequence<Object>
-
getPosPrevious
public Object getPosPrevious(int ipos)
Description copied from class:AbstractSequenceGet the element before the specified position.- Overrides:
getPosPreviousin classAbstractSequence<Object>- Parameters:
ipos- the specified position.- Returns:
- the following element, or eofValue if there is none. FIXME Should change eof handling so return type can be E.
-
getPosNextInt
public int getPosNextInt(int ipos)
Return following value (like getPosNext), as an integer.
-
getPosNext
public Object getPosNext(int ipos)
Description copied from class:AbstractSequenceGet the element following the specified position.- Overrides:
getPosNextin classAbstractSequence<Object>- Parameters:
ipos- the specified position.- Returns:
- the following element, or eofValue if there is none. Called by SeqPosition.getNext. FIXME Should change eof handling so return type can be E.
-
stringValue
public void stringValue(int startIndex, int endIndex, StringBuffer sbuf)
-
stringValue
public int stringValue(int index, StringBuffer sbuf)
-
stringValue
public int stringValue(boolean inElement, int index, StringBuffer sbuf)
-
createRelativePos
public int createRelativePos(int istart, int offset, boolean isAfter)- Overrides:
createRelativePosin classAbstractSequence<Object>
-
nextNodeIndex
public final int nextNodeIndex(int pos, int limit)Skip all primitive content nodes.
-
nextMatching
public int nextMatching(int startPos, ItemPredicate predicate, int endPos, boolean descend)Description copied from class:AbstractSequenceGet next matching child or descendent (ignoring attributes).- Overrides:
nextMatchingin classAbstractSequence<Object>- Parameters:
startPos- starting positionpredicate- a test (predicate) to apply to selected elementsendPos- stop before endPosdescend- if true do depth-first traversal.- Returns:
- poistion of next match or 0 if none found
-
nextPos
public int nextPos(int position)
Description copied from class:AbstractSequenceReturn the next position following the argument. The new position has the isAfter property. The argument is implicitly released (as in releasePos). Returns 0 if we are already at end of file.- Overrides:
nextPosin classAbstractSequence<Object>
-
nextDataIndex
public final int nextDataIndex(int pos)
-
documentUriOfPos
public Object documentUriOfPos(int pos)
-
compare
public int compare(int ipos1, int ipos2)Compare two positions, and indicate their relative order.- Overrides:
comparein classAbstractSequence<Object>
-
getIndexDifference
protected int getIndexDifference(int ipos1, int ipos0)Description copied from class:AbstractSequenceGet offset of (ipos1) relative to (ipos0).- Overrides:
getIndexDifferencein classAbstractSequence<Object>
-
nextIndex
public int nextIndex(int ipos)
Description copied from class:AbstractSequenceGet the offset from the beginning corresponding to a position cookie.- Overrides:
nextIndexin classAbstractSequence<Object>
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAbstractSequence<Object>
-
consume
public void consume(Consumer out)
- Specified by:
consumein interfaceConsumable- Overrides:
consumein classAbstractSequence<Object>
-
statistics
public void statistics()
-
statistics
public void statistics(PrintWriter out)
-
dump
public void dump()
-
dump
public void dump(PrintWriter out)
-
dump
public void dump(PrintWriter out, int start, int limit)
-
-