gnu.kawa.xml

Class SortedNodes

Implemented Interfaces:
Externalizable, Consumable, Consumer, PositionConsumer, Printable, XConsumer

public class SortedNodes
extends Nodes

Manages a sequence of node references in document order without duplicates. All elements are POSITION_PAIR_FOLLOWS elements, which makes operations simple and efficient. 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).

Field Summary

Fields inherited from class gnu.mapping.Values

empty, noArgs

Fields inherited from class gnu.lists.TreeList

BEGIN_ATTRIBUTE_LONG, BEGIN_ATTRIBUTE_LONG_SIZE, BEGIN_DOCUMENT, BEGIN_ELEMENT_LONG, BEGIN_ELEMENT_SHORT, BEGIN_ELEMENT_SHORT_INDEX_MAX, BEGIN_ENTITY, BEGIN_ENTITY_SIZE, DOCUMENT_URI, END_ATTRIBUTE_SIZE, END_DOCUMENT, END_ELEMENT_LONG, END_ELEMENT_SHORT, END_ENTITY, INT_FOLLOWS, MAX_CHAR_SHORT, POSITION_PAIR_FOLLOWS, PROCESSING_INSTRUCTION, attrStart, data, docStart, gapEnd, gapStart, objects, oindex

Method Summary

void
writePosition(AbstractSequence seq, int ipos)

Methods inherited from class gnu.kawa.xml.Nodes

append, beginEntity, endAttribute, endDocument, endElement, endEntity, find, get, getLength, getPos, getPosNext, getSeq, root, size, startAttribute, startDocument, startElement, write, write, write, write, writeBoolean, writeCDATA, writeComment, writeDouble, writeFloat, writeInt, writeLong, writeObject, writePosition, writeProcessingInstruction

Methods inherited from class gnu.mapping.Values

call_with, canonicalize, countValues, getValues, make, make, make, make, make, nextIndex, nextValue, print, readExternal, readResolve, values$V, writeExternal, writeValues

Methods inherited from class gnu.lists.TreeList

append, append, append, beginEntity, clear, compare, consume, consume, consumeIRange, consumeNext, consumePosRange, createPos, createRelativePos, documentUriOfPos, dump, dump, dump, endAttribute, endDocument, endElement, endEntity, ensureSpace, find, firstAttributePos, firstChildPos, get, getAttributeCount, getIndexDifference, getIntN, getLongN, getNextKind, getNextKindI, getNextTypeName, getNextTypeObject, getPosNext, getPosNextInt, getPosPrevious, gotoAttributesStart, gotoAttributesStart, gotoChildrenStart, hasNext, hashCode, ignoring, isEmpty, nextDataIndex, nextMatching, nextNodeIndex, nextPos, parentOrEntityI, parentOrEntityPos, parentPos, posToDataIndex, resizeObjects, setAttributeName, setElementName, setIntN, size, startAttribute, startAttribute, startDocument, startElement, startElement, statistics, statistics, stringValue, stringValue, stringValue, toString, write, write, write, write, writeBoolean, writeByte, writeCDATA, writeComment, writeComment, writeDocumentUri, writeDouble, writeFloat, writeInt, writeJoiner, writeLong, writeObject, writePosition, writeProcessingInstruction, writeProcessingInstruction

Methods inherited from class gnu.lists.AbstractSequence

add, add, addAll, addAll, addPos, clear, compare, compare, compare, consume, consumeNext, consumePosRange, contains, containsAll, copyPos, createPos, createRelativePos, elements, endPos, equals, equals, fill, fill, fillPosRange, firstAttributePos, firstChildPos, firstChildPos, fromEndIndex, get, get, getAttribute, getAttributeLength, getContainingSequenceSize, getEffectiveIndex, getIndexDifference, getIterator, getIterator, getIteratorAtPos, getLowBound, getNextKind, getNextTypeName, getNextTypeObject, getPosNext, getPosPrevious, getSize, gotoAttributesStart, gotoChildrenStart, gotoParent, hasNext, hasPrevious, hashCode, indexOf, isAfterPos, isEmpty, iterator, lastIndexOf, listIterator, listIterator, nextIndex, nextIndex, nextMatching, nextPos, parentPos, previousPos, rank, releasePos, remove, remove, removeAll, removePos, removePosRange, retainAll, set, set, setPosNext, setPosPrevious, size, stableCompare, startPos, subList, subSequence, subSequencePos, toArray, toArray, toString, toString, unsupported, unsupportedException

Method Details

writePosition

public void writePosition(AbstractSequence seq,
                          int ipos)
Specified by:
writePosition in interface PositionConsumer
Overrides:
writePosition in interface Nodes