public class SeqPosition<E,ESEQ extends AbstractSequence<E>>
extends java.lang.Object
implements java.util.ListIterator<E>, java.util.Enumeration<E>
Modifier and Type | Field and Description |
---|---|
int |
ipos
An integer that (together with xpos) indicates the current position.
|
ESEQ |
sequence
The Sequence relative to which ipos and xpos have meaning.
|
Constructor and Description |
---|
SeqPosition() |
SeqPosition(ESEQ seq) |
SeqPosition(ESEQ seq,
int ipos) |
SeqPosition(ESEQ seq,
int offset,
boolean isAfter) |
Modifier and Type | Method and Description |
---|---|
void |
add(E o) |
SeqPosition<E,ESEQ> |
copy() |
void |
finalize() |
int |
fromEndIndex() |
int |
getContainingSequenceSize() |
java.lang.Object |
getNext()
Get element following current position.
|
int |
getNextKind()
Return a code (defined in Sequence) for the type of the next element.
|
java.lang.String |
getNextTypeName()
Get the "tag name" for the next element, if any.
|
E |
getNextTypeObject()
Get the "tag object" for the next element, if any.
|
int |
getPos()
Get a position int "cookie" for this SeqPosition.
|
java.lang.Object |
getPrevious()
Get element before the current position.
|
boolean |
gotoChildrenStart()
Set position before first child (of the element following position).
|
void |
gotoEnd(ESEQ seq) |
boolean |
gotoNext()
Move one element forwards, if possible.
|
boolean |
gotoPrevious()
Move backwards one element.
|
void |
gotoStart(ESEQ seq) |
boolean |
hasMoreElements()
True if there is an element following the current position.
|
boolean |
hasNext()
See java.util.Iterator.
|
boolean |
hasPrevious()
See java.util.Iterator.
|
boolean |
isAfter()
Tests whether the position pair has the "isAfter" property.
|
static <E,ESEQ extends AbstractSequence<E>> |
make(ESEQ seq,
int ipos)
Creates a new SeqPosition, from a position pair.
|
E |
next()
See java.util.ListIterator.
|
E |
nextElement()
See java.util.Enumeration.
|
int |
nextIndex()
See java.util.Iterator.
|
E |
previous()
See java.util.ListIterator.
|
int |
previousIndex()
See java.util.Iterator.
|
void |
release() |
void |
remove() |
void |
set(E value) |
void |
set(ESEQ seq,
int index,
boolean isAfter) |
void |
set(SeqPosition<E,ESEQ> pos) |
void |
setNext(E value) |
void |
setPos(ESEQ seq,
int ipos) |
void |
setPos(int ipos) |
void |
setPrevious(E value) |
java.lang.String |
toInfo() |
java.lang.String |
toString() |
public ESEQ extends AbstractSequence<E> sequence
public int ipos
public SeqPosition()
public SeqPosition(ESEQ seq)
public SeqPosition(ESEQ seq, int offset, boolean isAfter)
public SeqPosition(ESEQ seq, int ipos)
public static <E,ESEQ extends AbstractSequence<E>> SeqPosition<E,ESEQ> make(ESEQ seq, int ipos)
public SeqPosition<E,ESEQ> copy()
public final void gotoStart(ESEQ seq)
public final void gotoEnd(ESEQ seq)
public boolean gotoChildrenStart()
public final boolean hasMoreElements()
hasMoreElements
in interface java.util.Enumeration<E>
public boolean hasNext()
public int getNextKind()
public java.lang.String getNextTypeName()
public E getNextTypeObject()
public boolean hasPrevious()
hasPrevious
in interface java.util.ListIterator<E>
public E next()
public boolean gotoNext()
public boolean gotoPrevious()
public E previous()
previous
in interface java.util.ListIterator<E>
public final E nextElement()
nextElement
in interface java.util.Enumeration<E>
public java.lang.Object getNext()
public java.lang.Object getPrevious()
public int nextIndex()
nextIndex
in interface java.util.ListIterator<E>
public final int fromEndIndex()
public int getContainingSequenceSize()
public final int previousIndex()
previousIndex
in interface java.util.ListIterator<E>
public boolean isAfter()
public void setNext(E value)
public void setPrevious(E value)
public void remove()
public int getPos()
public void setPos(ESEQ seq, int ipos)
public void setPos(int ipos)
public void set(ESEQ seq, int index, boolean isAfter)
public void set(SeqPosition<E,ESEQ> pos)
public void release()
public void finalize()
finalize
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toInfo()