Package org.jbox2d.pooling.normal
Class MutableStack<E>
java.lang.Object
org.jbox2d.pooling.normal.MutableStack<E>
- All Implemented Interfaces:
IDynamicStack<E>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
extendStack
(int argSize) protected abstract E
Creates a new instance of the object contained by this stack.final E
pop()
Pops an item off the stackfinal void
Pushes an item back on the stackMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
stack
private java.lang.Object[] stack -
index
private int index -
size
private int size
-
-
Constructor Details
-
MutableStack
public MutableStack(int argInitSize)
-
-
Method Details
-
extendStack
private void extendStack(int argSize) -
pop
Description copied from interface:IDynamicStack
Pops an item off the stack- Specified by:
pop
in interfaceIDynamicStack<E>
- Returns:
-
push
Description copied from interface:IDynamicStack
Pushes an item back on the stack- Specified by:
push
in interfaceIDynamicStack<E>
- Parameters:
argObject
-
-
newInstance
Creates a new instance of the object contained by this stack.
-