Package org.jbox2d.pooling.normal
Class CircleStack<E>
- java.lang.Object
-
- org.jbox2d.pooling.normal.CircleStack<E>
-
- All Implemented Interfaces:
IOrderedStack<E>
public abstract class CircleStack<E> extends java.lang.Object implements IOrderedStack<E>
-
-
Constructor Summary
Constructors Constructor Description CircleStack(int argStackSize, int argContainerSize)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract EnewInstance()Creates a new instance of the object contained by this stack.Epop()Returns the next object in the poolE[]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' items
-
-
-
Method Detail
-
pop
public final E pop()
Description copied from interface:IOrderedStackReturns the next object in the pool- Specified by:
popin interfaceIOrderedStack<E>- Returns:
-
pop
public final E[] pop(int argNum)
Description copied from interface:IOrderedStackReturns the next 'argNum' objects in the pool in an array- Specified by:
popin interfaceIOrderedStack<E>- 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>
-
newInstance
protected abstract E newInstance()
Creates a new instance of the object contained by this stack.
-
-