Package gnu.kawa.xml
Class SortedNodes
- java.lang.Object
-
- gnu.lists.AbstractSequence<E>
-
- gnu.mapping.Values<E>
-
- gnu.mapping.Values.FromList<SeqPosition>
-
- gnu.kawa.xml.Nodes
-
- gnu.kawa.xml.SortedNodes
-
- All Implemented Interfaces:
Consumable
,Consumer
,PositionConsumer
,Externalizable
,Serializable
,Appendable
,Consumer<Object>
,DoubleConsumer
,IntConsumer
,LongConsumer
,NodeList
public class SortedNodes extends Nodes
Manages a sequence of node references in document order without duplicates. The most recently added element is just before the gap. Optimized for the data being in order, or at least having good locality (a node being "near" the previously-entered node).- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class gnu.kawa.xml.Nodes
Nodes.NodeVector
-
Nested classes/interfaces inherited from class gnu.mapping.Values
Values.FromArray<E>, Values.FromList<E>, Values.FromTreeList, Values.Values2<E,V1 extends E,V2 extends E>
-
-
Constructor Summary
Constructors Constructor Description SortedNodes()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
writePosition(AbstractSequence seq, int ipos)
Consume a single position pair.void
writePosition(SeqPosition position)
Consume node at current position.-
Methods inherited from class gnu.kawa.xml.Nodes
append, append, append, beginEntity, consumePosRange, endAttribute, endDocument, endElement, endEntity, getLength, getPos, getSeq, ignoring, item, root, startAttribute, startDocument, startElement, write, write, write, write, writeBoolean, writeCDATA, writeComment, writeDouble, writeFloat, writeInt, writeLong, writeObject, writeProcessingInstruction
-
Methods inherited from class gnu.mapping.Values.FromList
get, getValues, readExternal, size
-
Methods inherited from class gnu.mapping.Values
call_with, canonicalize, checkFinalPos, countValues, getFromPos, getFromPosFinal, incrPos, make, make, make, make, makeFromArray, nextIndex, nextIndex, nextValue, print, readResolve, values, values2, writeExternal, writeValues
-
Methods inherited from class gnu.lists.AbstractSequence
add, add, addAll, addAll, addPos, asImmutable, badRank, boundedHash, checkCanWrite, checkRank, clear, compare, compare, compare, consume, consume, consumeNext, contains, containsAll, copyPos, createPos, createRelativePos, effectiveIndex, effectiveIndex, effectiveIndex, effectiveIndex, effectiveIndex, elements, endPos, equals, equals, fill, fill, fillPosRange, firstAttributePos, firstChildPos, firstChildPos, fromEndIndex, get, get, get, get, getAttribute, getAttributeLength, getBooleanRaw, getByteRaw, getCharRaw, getContainingSequenceSize, getDoubleRaw, getElementKind, getFloatRaw, getIndexDifference, getInt, getInt, getInt, getInt, getInt, getIntRaw, getIterator, getIterator, getIteratorAtPos, getLongRaw, getLowBound, getNextKind, getNextTypeName, getNextTypeObject, getPosNext, getPosPrevious, getRaw, getRowMajor, getShortRaw, getSize, getSize, gotoAttributesStart, gotoChildrenStart, gotoParent, hashCode, hasNext, hasPrevious, indexOf, isAfterPos, isEmpty, iterator, lastIndexOf, listIterator, listIterator, nextIndex, nextMatching, nextPos, parentPos, previousPos, rank, releasePos, remove, remove, removeAll, removePos, removePosRange, retainAll, set, set, setAt, setBuffer, setPosNext, setPosPrevious, setRaw, stableCompare, startPos, subList, subSequence, subSequencePos, toArray, toArray, toString, toString, unsupported, unsupportedException
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface gnu.lists.Consumable
consume
-
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
-
-
-
-
Method Detail
-
writePosition
public void writePosition(SeqPosition position)
Description copied from interface:PositionConsumer
Consume 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:
writePosition
in interfacePositionConsumer
- Overrides:
writePosition
in classNodes
-
writePosition
public void writePosition(AbstractSequence seq, int ipos)
Description copied from interface:PositionConsumer
Consume 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:
writePosition
in interfacePositionConsumer
- Overrides:
writePosition
in classNodes
-
-