Package sc.util

Class IntStack

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    public class IntStack
    extends java.lang.Object
    implements java.io.Serializable, java.lang.Cloneable
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      IntStack​(int capacity)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void appendAll​(IntStack other)  
      IntStack clone()  
      int get​(int val)  
      int pop()  
      void push​(int val)  
      void remove​(int val)
      Remove the ith entry of the stack
      void set​(int ix, int newVal)  
      int size()  
      int top()  
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IntStack

        public IntStack​(int capacity)
    • Method Detail

      • size

        public int size()
      • push

        public void push​(int val)
      • get

        public int get​(int val)
      • remove

        public void remove​(int val)
        Remove the ith entry of the stack
      • set

        public void set​(int ix,
                        int newVal)
      • top

        public int top()
      • pop

        public int pop()
      • appendAll

        public void appendAll​(IntStack other)
      • clone

        public IntStack clone()
        Overrides:
        clone in class java.lang.Object