Class BlockContextStack
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<BlockContext<?>>
,Collection<BlockContext<?>>
,Deque<BlockContext<?>>
,List<BlockContext<?>>
,Queue<BlockContext<?>>
The intention is as follows:
Initially, it contains a single BlockContext
instance which represents
the root context of the YAML tree. Every sequence item and mapping value
in the YAML file leads to pushing a new BlockContext
onto the stack
which is created by the topmost BlockContext.getContext(java.lang.String)
method of the topmost BlockContext
. This context is removed from the stack
once parsing of the respective sequence item or mapping pair is finished.
- Author:
- hmlnarik
- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionBlockContext<?>
push
(String name, Supplier<BlockContext<?>> nullProducer) Pushes the subcontext to the stack.Methods inherited from class java.util.LinkedList
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, descendingIterator, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, set, size, spliterator, toArray, toArray
Methods inherited from class java.util.AbstractSequentialList
iterator
Methods inherited from class java.util.AbstractList
equals, hashCode, listIterator, removeRange, subList
Methods inherited from class java.util.AbstractCollection
containsAll, isEmpty, removeAll, retainAll, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
containsAll, equals, hashCode, isEmpty, iterator, listIterator, removeAll, replaceAll, retainAll, sort, subList
-
Constructor Details
-
BlockContextStack
-
-
Method Details
-
push
Pushes the subcontext to the stack.The subcontext is created by calling
BlockContext.getContext(java.lang.String)
method. If this method returnsnull
, the control reverts to producing the subcontext usingnullProducer
which must return a validBlockContext
object (it must not return {@code null). @param name @param nullProducer @return
-