Class SimpleStack<E>

  • Type Parameters:
    E -

    public class SimpleStack<E>
    extends java.lang.Object
    Stack implementation optimized for JOL uses. Cuts corners where it can.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.lang.Object[] elements  
      (package private) int head  
    • Constructor Summary

      Constructors 
      Constructor Description
      SimpleStack()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isEmpty()  
      E pop()  
      void push​(E e)  
      private void resize()  
      • Methods inherited from class java.lang.Object

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

      • elements

        java.lang.Object[] elements
      • head

        int head
    • Constructor Detail

      • SimpleStack

        public SimpleStack()
    • Method Detail

      • resize

        private void resize()
      • isEmpty

        public boolean isEmpty()
      • push

        public void push​(E e)
      • pop

        public E pop()