|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.composite.geometry.GeometryItemPool
This class is a pool for GeometryItem 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 GeometryItem |
get(java.lang.String name)
Returns the pooled GeometryItem stored under the given name. |
static boolean |
isAvailable(java.lang.String name)
Returns a boolean that indicates whether a
GeometryItem with the name given by
name is in the pool or not. |
static java.util.Set |
names()
Returns the names of all items as a Set. |
static void |
pool(GeometryItem geometry)
Pools the given GeometryItem under it's name. |
static GeometryItem |
remove(java.lang.String name)
Removes the GeometryItem with the given name from the pool. |
static int |
size()
Returns the count pooled GeometryItems. |
static void |
useThreadLocal()
A call to this method configures the GeometryItemPool to
make use of the ThreadLocal class hence a pool is created
for each Thread the GeometryItemPool 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()
GeometryItemPool to
make use of the ThreadLocal class hence a pool is created
for each Thread the GeometryItemPool is used
by.
GeometryItemPool is in use by any Thread.
ThreadLocalpublic static final boolean isAvailable(java.lang.String name)
boolean that indicates whether a
GeometryItem with the name given by
name is in the pool or not.
name - the name of the GeometryItem to check
GeometryItem with the given name is available or notpublic static final GeometryItem get(java.lang.String name)
GeometryItem stored under the given name.
name - the name of the GeometryItem to look up.
GeometryItem; null if no
such item exists within this pool.public static final void pool(GeometryItem geometry)
GeometryItem under it's name.
geometry - the GeometryItem to pool.public static final GeometryItem remove(java.lang.String name)
GeometryItem with the given name from the pool.
name - the name of the GeometryItem to remove.
GeometryItem;null if no
GeometryItem was found.public static final int size()
GeometryItems.
GeometryItem objectspublic static final void clear()
public static final java.util.Set names()
Set.
Map.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 | ||||||||||