Class ArrayStack<E>

java.lang.Object
io.ebeaninternal.server.util.ArrayStack<E>
All Implemented Interfaces:
Iterable<E>
Direct Known Subclasses:
PathStack

public class ArrayStack<E> extends Object implements Iterable<E>
Stack based on ArrayList.
  • Constructor Details

    • ArrayStack

      public ArrayStack(int size)
      Creates an empty Stack with an initial size.
    • ArrayStack

      public ArrayStack()
      Creates an empty Stack.
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • push

      public void push(E item)
      Pushes an item onto the top of this stack.
    • pop

      public E pop()
      Removes the object at the top of this stack and returns that object as the value of this function.
    • peek

      public E peek()
      Returns the object at the top of this stack without removing it.
    • peekWithNull

      public E peekWithNull()
      Returns the object at the top of this stack without removing it. If the stack is empty this returns null.
    • isEmpty

      public boolean isEmpty()
      Tests if this stack is empty.
    • size

      public int size()
    • contains

      public boolean contains(E o)
    • iterator

      public Iterator<E> iterator()
      Specified by:
      iterator in interface Iterable<E>