Class DequeStack<T>

  • All Implemented Interfaces:
    Stack<T>

    class DequeStack<T>
    extends java.lang.Object
    implements Stack<T>
    Since:
    1.1
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Deque<T> deque  
    • Constructor Summary

      Constructors 
      Constructor Description
      DequeStack()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isEmpty()  
      T peek()  
      T pop()  
      void push​(T t)  
      int size()  
      • Methods inherited from class java.lang.Object

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

      • deque

        private final java.util.Deque<T> deque
    • Constructor Detail

      • DequeStack

        DequeStack()
    • Method Detail

      • push

        public void push​(T t)
        Specified by:
        push in interface Stack<T>
      • peek

        public T peek()
        Specified by:
        peek in interface Stack<T>
      • pop

        public T pop()
        Specified by:
        pop in interface Stack<T>
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface Stack<T>
      • size

        public int size()
        Specified by:
        size in interface Stack<T>