Package org.simpleframework.xml.stream
Class InputStack
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<T>
-
- org.simpleframework.xml.stream.Stack<InputNode>
-
- org.simpleframework.xml.stream.InputStack
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.lang.Iterable<InputNode>
,java.util.Collection<InputNode>
,java.util.List<InputNode>
,java.util.RandomAccess
class InputStack extends Stack<InputNode>
TheInputStack
is used to keep track of the nodes that have been read from the document. This ensures that when nodes are read from the source document that the reader can tell whether a child node for a givenInputNode
can be created. Each created node is pushed, and popped when ended.- See Also:
InputNode
-
-
Constructor Summary
Constructors Constructor Description InputStack()
Constructor for theInputStack
object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isRelevant(InputNode value)
This is used to determine if the specified node is relevant with respect to the state of the input stack.-
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
-
-
-
Method Detail
-
isRelevant
public boolean isRelevant(InputNode value)
This is used to determine if the specified node is relevant with respect to the state of the input stack. This returns true if there are no elements in the stack, which accounts for a new root node. Also this returns true if the specified node exists within the stack and is thus an active node.- Parameters:
value
- this is the input node value to be checked- Returns:
- returns true if the node is relevant in the stack
-
-