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