|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.composite.geometry.GeometryPool
This class is a pool for GeometryDescriptor instances.
| Method Summary | |
static void |
clear()
Clears the pool. |
static void |
dump(java.io.PrintStream s)
Dumps the pool to the PrintStream given by the parameter
s. |
static GeometryDescriptor |
get(java.lang.String name)
Returns the instance of the GeometryDescriptor with the
given name if any. |
static boolean |
isAvailable(java.lang.String name)
Returns a boolean that indicates whether a
GeometryDescriptor with the name given by
name is in the pool or not. |
static java.util.Set |
names()
Method names returns a set the keys of the internal poolGeometries map. |
static void |
pool(GeometryDescriptor geometry)
Adds the given GeometryDescriptor to the list of pooled
descriptors. |
static GeometryDescriptor |
remove(java.lang.String name)
Removes the GeometryDescriptor with the given name from the
pool. |
static int |
size()
Returns the size of the pool. |
static void |
useThreadLocal()
A call to this method configures the GeometryPool to
make use of the ThreadLocal class hence a pool is created
for each Thread the GeometryPool is used
by.
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static final void useThreadLocal()
GeometryPool to
make use of the ThreadLocal class hence a pool is created
for each Thread the GeometryPool is used
by.
GeometryPool is in use by any Thread.
ThreadLocalpublic static final boolean isAvailable(java.lang.String name)
boolean that indicates whether a
GeometryDescriptor with the name given by
name is in the pool or not.
name - the name of the GeometryDescriptor to check
GeometryDescriptor with the given name is available or notpublic static final GeometryDescriptor get(java.lang.String name)
GeometryDescriptor with the
given name if any. Null is returned, if there is no pooled
instance with the given name.
name - the name of the GeometryDescriptor to retrieve.
GeometryDescriptor with the
given name; null if there is none.public static final void pool(GeometryDescriptor geometry)
GeometryDescriptor to the list of pooled
descriptors. To retrieve pooled instance, use the name of the
GeometryDescriptor.
geometry - the GeometryDescriptor to pool.public static final GeometryDescriptor remove(java.lang.String name)
GeometryDescriptor with the given name from the
pool.
name - the name of the GeometryDescriptor to remove.
GeometryDescriptor; null
if no GeometryDescriptor was found.public static final int size()
GeometryDescriptor objectspublic static final java.util.Set names()
public static final void clear()
public static final void dump(java.io.PrintStream s)
PrintStream given by the parameter
s.
s - the PrintStream to dump the pool to
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||