Package org.simpleframework.xml.stream
Class InputStack
java.lang.Object
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<InputNode>
,Collection<InputNode>
,List<InputNode>
,RandomAccess
,SequencedCollection<InputNode>
The
InputStack
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 given InputNode
can be
created. Each created node is pushed, and popped when ended.- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
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, addFirst, addLast, clear, clone, contains, ensureCapacity, equals, forEach, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeIf, removeLast, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
Methods inherited from class java.util.AbstractCollection
containsAll, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
Methods inherited from interface java.util.List
containsAll, reversed
-
Constructor Details
-
InputStack
public InputStack()Constructor for theInputStack
object. This is used to create a stack that can be used to keep track of the elements that have been read from the source XML document.
-
-
Method Details
-
isRelevant
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
-