public class GapVector extends AbstractSequence implements Sequence
| Modifier and Type | Field and Description |
|---|---|
SimpleVector |
base |
int |
gapEnd |
int |
gapStart |
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| Modifier | Constructor and Description |
|---|---|
protected |
GapVector() |
|
GapVector(SimpleVector base) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
java.lang.Object o)
See java.util.List.
|
protected int |
addPos(int ipos,
java.lang.Object value)
Add a value at a specified Pos.
|
void |
consumePosRange(int iposStart,
int iposEnd,
Consumer out) |
int |
createPos(int index,
boolean isAfter)
Generate a position at a given index.
|
void |
fill(java.lang.Object value) |
void |
fillPosRange(int fromPos,
int toPos,
java.lang.Object value) |
protected void |
gapReserve(int size)
Make sure gap is at least 'size' elements long.
|
protected void |
gapReserve(int where,
int needed)
Adjust gap to 'where', and make sure it is least `needed'
elements long.
|
java.lang.Object |
get(int index)
See java.util.List.
|
int |
getNextKind(int ipos) |
int |
getSegment(int where,
int len)
If needed, move the gap so the given segment is contiguous.
|
boolean |
hasNext(int ipos) |
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.
|
protected void |
removePosRange(int ipos0,
int ipos1)
Remove a range where each end-point is a position in a container.
|
java.lang.Object |
set(int index,
java.lang.Object value)
See java.util.List.
|
protected void |
shiftGap(int newGapStart) |
int |
size()
See java.util.List.
|
add, addAll, addAll, clear, compare, compare, compare, consume, consumeNext, contains, containsAll, copyPos, createRelativePos, elements, endPos, equals, equals, fill, firstAttributePos, firstChildPos, firstChildPos, fromEndIndex, get, getAttribute, getAttributeLength, getContainingSequenceSize, getEffectiveIndex, getIndexDifference, getIterator, getIterator, getIteratorAtPos, getLowBound, getNextTypeName, getNextTypeObject, getPosNext, getPosPrevious, getSize, gotoAttributesStart, gotoChildrenStart, gotoParent, hashCode, hasPrevious, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, nextIndex, nextMatching, nextPos, parentPos, previousPos, rank, releasePos, remove, remove, removeAll, removePos, retainAll, set, setPosNext, setPosPrevious, stableCompare, startPos, subList, subSequence, subSequencePos, toArray, toArray, toString, toString, unsupported, unsupportedExceptionclone, equals, finalize, getClass, notify, notifyAll, wait, wait, waitadd, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, subList, toArray, toArrayconsumepublic SimpleVector base
public int gapStart
public int gapEnd
public GapVector(SimpleVector base)
protected GapVector()
public int size()
AbstractSequencesize in interface Sequencesize in interface java.util.Collectionsize in interface java.util.Listsize in class AbstractSequencepublic boolean hasNext(int ipos)
hasNext in class AbstractSequencepublic int getNextKind(int ipos)
getNextKind in class AbstractSequencepublic java.lang.Object get(int index)
AbstractSequenceget in interface Sequenceget in interface java.util.Listget in class AbstractSequencepublic java.lang.Object set(int index,
java.lang.Object value)
Sequenceset in interface Sequenceset in interface java.util.Listset in class AbstractSequencepublic void fill(java.lang.Object value)
fill in interface Sequencefill in class AbstractSequencepublic void fillPosRange(int fromPos,
int toPos,
java.lang.Object value)
fillPosRange in class AbstractSequenceprotected void shiftGap(int newGapStart)
protected final void gapReserve(int size)
protected void gapReserve(int where,
int needed)
public int getSegment(int where,
int len)
protected int addPos(int ipos,
java.lang.Object value)
AbstractSequenceaddPos in class AbstractSequencepublic void add(int index,
java.lang.Object o)
AbstractSequenceadd in interface java.util.Listadd in class AbstractSequenceprotected void removePosRange(int ipos0,
int ipos1)
AbstractSequenceremovePosRange in class AbstractSequenceipos0 - start of range, as a poistionipos1 - end of rangepublic int createPos(int index,
boolean isAfter)
AbstractSequencecreatePos in class AbstractSequenceindex - offset from beginning of desired positionisAfter - should the position have the isAfter propertyprotected boolean isAfterPos(int ipos)
AbstractSequenceisAfterPos in class AbstractSequenceprotected int nextIndex(int ipos)
AbstractSequencenextIndex in class AbstractSequencepublic void consumePosRange(int iposStart,
int iposEnd,
Consumer out)
consumePosRange in class AbstractSequence