|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.composite.coordinate.ScalePool
Class ScalePool defines the needed facility to pool
created Scale instances. This class is responsible
for maintaining global references to Scale objects
needed by multiple clients.
This class has no public constructor. Use the static class methods directly.
While it is possible to remove all pooled Scale objects
by invoking the clear() method, this should only be done when
you are sure that all pooled objects are no longer being referenced by
any other object. The actual number of pooled Scale objects
can be determined by invoking the size() method. Additionally,
the ScalePool can parse a canonical description and return
a new or existing Scale when you invoke the
parse(java.lang.String) method.
| Method Summary | |
static void |
clear()
Removes all the pooled Scales from the
ScalePool. |
static void |
dump(java.io.PrintStream s)
Dumps the ScalePool to the PrintStream given by
s. |
static Scale |
parse(java.lang.String description)
Parses the canonical description of a Scale given
by description and pools a new instance if necessary. |
static int |
size()
Returns the number of the Scales actually pooled
in the |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static final Scale parse(java.lang.String description)
throws ScaleParseException
Scale given
by description and pools a new instance if necessary. The
returned value is an instance of the Scale that
is described by description.
description - the canonical description of a Scale
Scale
ScaleParseException - is thrown when an error occurs
while parsing the canonical description of the Scalepublic static final int size()
Scales actually pooled
in the
Scalespublic static final void clear()
Scales from the
ScalePool. Notice that this only
can be done when it is sure that the pooled
Scales are no longer referenced by any object.
Otherwise these objects have a weak reference.
public static final void dump(java.io.PrintStream s)
ScalePool to the PrintStream given by
s.
s - the PrintStream to dump the ScalePool
to
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||