org.jbox2d.pooling
Class OrderedStack<E>

java.lang.Object
  extended by org.jbox2d.pooling.OrderedStack<E>
All Implemented Interfaces:
IOrderedStack<E>

public class OrderedStack<E>
extends Object
implements IOrderedStack<E>

Author:
Daniel Murphy

Constructor Summary
OrderedStack(Class<E> argClass, int argStackSize, int argContainerSize)
           
 
Method Summary
 E pop()
          Returns the next object in the pool
 E[] pop(int argNum)
          Returns the next 'argNum' objects in the pool in an array
 void push(int argNum)
          Tells the stack to take back the last 'argNum' items
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrderedStack

public OrderedStack(Class<E> argClass,
                    int argStackSize,
                    int argContainerSize)
Method Detail

pop

public final E pop()
Description copied from interface: IOrderedStack
Returns the next object in the pool

Specified by:
pop in interface IOrderedStack<E>
Returns:

pop

public final E[] pop(int argNum)
Description copied from interface: IOrderedStack
Returns the next 'argNum' objects in the pool in an array

Specified by:
pop in interface IOrderedStack<E>
Returns:
an array containing the next pool objects in items 0-argNum. Array length and uniqueness not guaranteed.

push

public final void push(int argNum)
Description copied from interface: IOrderedStack
Tells the stack to take back the last 'argNum' items

Specified by:
push in interface IOrderedStack<E>


Copyright © 2011. All Rights Reserved.