Class OrderedStack<E>


  • public abstract class OrderedStack<E>
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.Object[] container  
      private int index  
      private java.lang.Object[] pool  
      private int size  
    • Constructor Summary

      Constructors 
      Constructor Description
      OrderedStack​(int argStackSize, int argContainerSize)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract E newInstance()
      Creates a new instance of the object contained by this stack.
      E pop()  
      E[] pop​(int argNum)  
      void push​(int argNum)  
      • Methods inherited from class java.lang.Object

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

      • pool

        private final java.lang.Object[] pool
      • index

        private int index
      • size

        private final int size
      • container

        private final java.lang.Object[] container
    • Constructor Detail

      • OrderedStack

        public OrderedStack​(int argStackSize,
                            int argContainerSize)
    • Method Detail

      • pop

        public final E pop()
      • pop

        public final E[] pop​(int argNum)
      • push

        public final void push​(int argNum)
      • newInstance

        protected abstract E newInstance()
        Creates a new instance of the object contained by this stack.