Class NDC.Stack<T>

  • Enclosing class:
    NDC

    private static final class NDC.Stack<T>
    extends java.lang.Object
    • Field Summary

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

      Constructors 
      Modifier Constructor Description
      private Stack()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int depth()  
      T get​(int n)  
      boolean isEmpty()  
      T pop()  
      void push​(T value)  
      T top()  
      java.lang.String toString()  
      void trimTo​(int max)  
      • Methods inherited from class java.lang.Object

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

      • data

        private java.lang.Object[] data
      • sp

        private int sp
    • Constructor Detail

      • Stack

        private Stack()
    • Method Detail

      • push

        public void push​(T value)
      • pop

        public T pop()
      • top

        public T top()
      • isEmpty

        public boolean isEmpty()
      • depth

        public int depth()
      • trimTo

        public void trimTo​(int max)
      • get

        public T get​(int n)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object