public class Nodes extends Values.FromList<SeqPosition> implements PositionConsumer, org.w3c.dom.NodeList, Consumer
Modifier and Type | Class and Description |
---|---|
static class |
Nodes.NodeVector |
Values.FromArray<E>, Values.FromList<E>, Values.FromTreeList, Values.Values2<E,V1 extends E,V2 extends E>
Modifier and Type | Field and Description |
---|---|
protected Nodes.NodeVector |
vector |
noInts
Constructor and Description |
---|
Nodes() |
Modifier and Type | Method and Description |
---|---|
Consumer |
append(char c) |
Consumer |
append(java.lang.CharSequence csq) |
Consumer |
append(java.lang.CharSequence csq,
int start,
int end) |
void |
beginEntity(java.lang.Object base) |
void |
consumePosRange(int iposStart,
int iposEnd,
Consumer out) |
void |
endAttribute()
End of an attribute or end of an actual parameter.
|
void |
endDocument() |
void |
endElement() |
void |
endEntity() |
int |
getLength() |
int |
getPos(int index)
Optimization of ((SeqPosition) get(index)).
|
AbstractSequence |
getSeq(int index)
Optimization of
((SeqPosition) get(index)).sequence . |
boolean |
ignoring()
True if consumer is ignoring rest of element.
|
org.w3c.dom.Node |
item(int index) |
static KNode |
root(NodeTree seq,
int ipos) |
void |
startAttribute(java.lang.Object attrType)
Write a attribute for the current element.
|
void |
startDocument() |
void |
startElement(java.lang.Object type) |
void |
write(char[] buf,
int off,
int len) |
void |
write(java.lang.CharSequence str,
int start,
int length) |
void |
write(int v) |
void |
write(java.lang.String str) |
void |
writeBoolean(boolean v) |
void |
writeCDATA(char[] chars,
int offset,
int length) |
void |
writeComment(char[] chars,
int offset,
int length) |
void |
writeDouble(double v) |
void |
writeFloat(float v) |
void |
writeInt(int v) |
void |
writeLong(long v) |
void |
writeObject(java.lang.Object v) |
void |
writePosition(AbstractSequence seq,
int ipos)
Consume a single position pair.
|
void |
writePosition(SeqPosition position)
Consume node at current position.
|
void |
writeProcessingInstruction(java.lang.String target,
char[] content,
int offset,
int length) |
get, getValues, readExternal, size
call_with, canonicalize, checkFinalPos, countValues, getFromPos, getFromPosFinal, incrPos, make, make, make, make, makeFromArray, nextIndex, nextIndex, nextValue, print, readResolve, values, values2, writeExternal, writeValues
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
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
consume
protected Nodes.NodeVector vector
public Consumer append(char c)
append
in interface java.lang.Appendable
public Consumer append(java.lang.CharSequence csq)
append
in interface java.lang.Appendable
public boolean ignoring()
Consumer
public void writePosition(AbstractSequence seq, int ipos)
PositionConsumer
writePosition
in interface PositionConsumer
public void writePosition(SeqPosition position)
PositionConsumer
writePosition
in interface PositionConsumer
public void writeObject(java.lang.Object v)
public void writeFloat(float v)
public void writeDouble(double v)
public void writeLong(long v)
public void writeInt(int v)
public void writeBoolean(boolean v)
public void write(int v)
public Consumer append(java.lang.CharSequence csq, int start, int end)
append
in interface java.lang.Appendable
public void write(char[] buf, int off, int len)
public void write(java.lang.CharSequence str, int start, int length)
public void write(java.lang.String str)
public void startElement(java.lang.Object type)
public void endElement()
public void startAttribute(java.lang.Object attrType)
Consumer
public void endAttribute()
Consumer
public void writeComment(char[] chars, int offset, int length)
public void writeCDATA(char[] chars, int offset, int length)
public void writeProcessingInstruction(java.lang.String target, char[] content, int offset, int length)
public void startDocument()
public void endDocument()
public void beginEntity(java.lang.Object base)
public void endEntity()
public int getLength()
getLength
in interface org.w3c.dom.NodeList
public org.w3c.dom.Node item(int index)
item
in interface org.w3c.dom.NodeList
public AbstractSequence getSeq(int index)
((SeqPosition) get(index)).sequence
.
However returns null instead of throwing IndexOutOfBoundsException
if index >= count
.public int getPos(int index)
public void consumePosRange(int iposStart, int iposEnd, Consumer out)
consumePosRange
in class AbstractSequence<SeqPosition>