Class Stack

java.lang.Object
cern.jet.random.Stack

class Stack extends Object
Not yet commented.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) int
     
    (package private) int
     
    (package private) int[]
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Stack(int capacity)
    Constructs a new stack with the given capacity.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    pop()
    Returns the topmost element.
    void
    push(int value)
    Places the given value on top of the stack.
    int
    Returns the number of elements contained.

    Methods inherited from class java.lang.Object

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

    • N

      int N
    • v

      int[] v
    • i

      int i
  • Constructor Details

    • Stack

      public Stack(int capacity)
      Constructs a new stack with the given capacity.
  • Method Details

    • pop

      public int pop()
      Returns the topmost element.
    • push

      public void push(int value)
      Places the given value on top of the stack.
    • size

      public int size()
      Returns the number of elements contained.