org.openmali.vecmath2.pools
Class ColorPool

java.lang.Object
  extended by org.openmali.vecmath2.pools.ObjectPool<Colorf>
      extended by org.openmali.vecmath2.pools.ColorPool

public class ColorPool
extends ObjectPool<Colorf>

An instance pool for Colorf instances.

Author:
Marvin Froehlich (aka Qudus)

Constructor Summary
ColorPool(int initialSize)
           
 
Method Summary
 Colorf alloc()
          
 Colorf alloc(float r, float g, float b)
           
 Colorf alloc(float r, float g, float b, float a)
           
protected  Colorf newInstance()
          Creates a new instance of a pooled object.
 
Methods inherited from class org.openmali.vecmath2.pools.ObjectPool
free, getSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColorPool

public ColorPool(int initialSize)
Method Detail

newInstance

protected Colorf newInstance()
Creates a new instance of a pooled object.

Specified by:
newInstance in class ObjectPool<Colorf>
Returns:
the new object instance

alloc

public Colorf alloc()

Overrides:
alloc in class ObjectPool<Colorf>

alloc

public Colorf alloc(float r,
                    float g,
                    float b)

alloc

public Colorf alloc(float r,
                    float g,
                    float b,
                    float a)