Class CircleStack<E>
java.lang.Object
org.jbox2d.pooling.normal.CircleStack<E>
- All Implemented Interfaces:
IOrderedStack<E>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract ECreates a new instance of the object contained by this stack.final Epop()Returns the next object in the poolfinal E[]pop(int argNum) Returns the next 'argNum' objects in the pool in an arrayvoidpush(int argNum) Tells the stack to take back the last 'argNum' itemsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
pool
private final java.lang.Object[] pool -
index
private int index -
size
private final int size -
container
private final java.lang.Object[] container
-
-
Constructor Details
-
CircleStack
public CircleStack(int argStackSize, int argContainerSize)
-
-
Method Details
-
pop
Description copied from interface:IOrderedStackReturns the next object in the pool- Specified by:
popin interfaceIOrderedStack<E>- Returns:
-
pop
Description copied from interface:IOrderedStackReturns the next 'argNum' objects in the pool in an array- Specified by:
popin interfaceIOrderedStack<E>- Parameters:
argNum-- Returns:
- an array containing the next pool objects in items 0-argNum. Array length and uniqueness not guaranteed.
-
push
public void push(int argNum) Description copied from interface:IOrderedStackTells the stack to take back the last 'argNum' items- Specified by:
pushin interfaceIOrderedStack<E>- Parameters:
argNum-
-
newInstance
Creates a new instance of the object contained by this stack.
-