Class StackImpl<E>


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

      Fields 
      Modifier and Type Field Description
      private java.lang.Object[] data  
      private int top  
    • Constructor Summary

      Constructors 
      Constructor Description
      StackImpl()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean empty()  
      private void ensure()  
      E peek()  
      E pop()  
      java.lang.Object push​(E item)  
      • Methods inherited from class java.lang.Object

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

      • data

        private java.lang.Object[] data
      • top

        private int top
    • Constructor Detail

      • StackImpl

        public StackImpl()
    • Method Detail

      • empty

        public final boolean empty()
      • peek

        public final E peek()
      • pop

        public final E pop()
      • ensure

        private void ensure()
      • push

        public final java.lang.Object push​(E item)