Class StackKeeper


  • public class StackKeeper
    extends java.lang.Object
    Simple wrapper of a List to put Elements in that are created by inner tags of the given Tag.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.List<Element> stack  
      private Tag tag  
    • Constructor Summary

      Constructors 
      Constructor Description
      StackKeeper​(Tag t)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(Element content)
      Add an element to this keepers stack.
      void add​(java.util.Collection<? extends Element> elements)
      Add all given elements to the stack, according to the natural order.
      java.util.List<Element> getElements()  
      Tag getTag()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • tag

        private final Tag tag
      • stack

        private final java.util.List<Element> stack
    • Constructor Detail

      • StackKeeper

        public StackKeeper​(Tag t)
        Parameters:
        t - the tag
    • Method Detail

      • add

        public void add​(Element content)
        Add an element to this keepers stack.
        Parameters:
        content - the element to add
      • getElements

        public java.util.List<Element> getElements()
        Returns:
        the elements in this stack
      • add

        public void add​(java.util.Collection<? extends Element> elements)
        Add all given elements to the stack, according to the natural order.
        Parameters:
        elements - collection of Element
      • getTag

        public Tag getTag()
        Returns:
        the tag