Package org.simpleframework.xml.util
Class Resolver.Stack.Sequence
java.lang.Object
org.simpleframework.xml.util.Resolver.Stack.Sequence
- All Implemented Interfaces:
Iterator<M>
- Enclosing class:
Resolver.Stack
The is used to order the
Match
objects in the
insertion order. Iterating in insertion order allows the
resolver object to be serialized and deserialized to and
from an XML document without disruption resolution order.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
The cursor used to acquire objects from the stack. -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
cursor
private int cursorThe cursor used to acquire objects from the stack.
-
-
Constructor Details
-
Sequence
public Sequence()Constructor for theSequence
object. This is used to position the cursor at the end of the list so the first inserted match is the first returned from this.
-
-
Method Details
-
next
This returns theMatch
object at the cursor position. If the cursor has reached the start of the list then this returns null instead of the first match. -
hasNext
public boolean hasNext()This is used to determine if the cursor has reached the start of the list. When the cursor reaches the start of the list then this method returns false. -
remove
public void remove()Removes the match from the cursor position. This also ensures that the cache is cleared so that resolutions made before the removal do not affect the semantics.
-