java.lang.Object
io.ebeaninternal.server.util.ArrayStack<E>
- All Implemented Interfaces:
Iterable<E>
- Direct Known Subclasses:
PathStack
Stack based on ArrayList.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an empty Stack.ArrayStack(int size) Creates an empty Stack with an initial size. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanisEmpty()Tests if this stack is empty.iterator()peek()Returns the object at the top of this stack without removing it.Returns the object at the top of this stack without removing it.pop()Removes the object at the top of this stack and returns that object as the value of this function.voidPushes an item onto the top of this stack.intsize()toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
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
-
push
Pushes an item onto the top of this stack. -
pop
Removes the object at the top of this stack and returns that object as the value of this function. -
peek
Returns the object at the top of this stack without removing it. -
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
-
iterator
-