|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.composite.coordinate.CoordinateSystemPool
/**
Class CoordinateSystemPool defines the needed facility to pool
created CoordinateSystem instances. This class is responsible
for maintaining global references to CoordinateSystem 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 CoordinateSystem 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 CoordinateSystem objects can
be determined by invoking the size() method. Additionally, the
CoordinateSystemPool can parse a canonical description and return a new
or existing CoordinateSystem when you invoke the parse(java.lang.String) method.
| Method Summary | |
static void |
clear()
Removes all the pooled CoordinateSystems from the
CoordinateSystemPool. |
static void |
dump(java.io.PrintStream s)
Dumps the CoordinateSystemPool to the
PrintStream given by s. |
static CoordinateSystem |
parse(java.lang.String description)
Parses the canonical description of a CoordinateSystem given
by description and pools a new instance if necessary. |
static int |
size()
Returns the number of the CoordinateSystems actually pooled
in the CoordinateSystemPool. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static CoordinateSystem parse(java.lang.String description)
throws CoordinateSystemParseException
CoordinateSystem given
by description and pools a new instance if necessary. The
returned value is an instance of the CoordinateSystem that
is described by description.
description - the canonical description of a
CoordinateSystem
CoordinateSystem
CoordinateSystemParseException - is thrown when an error occurs
while parsing the canonical description of the
CoordinateSystempublic static final int size()
CoordinateSystems actually pooled
in the CoordinateSystemPool.
CoordinateSystemspublic static final void clear()
CoordinateSystems from the
CoordinateSystemPool. Notice that this only
can be done when it is sure that the pooled
CoordinateSystems are no longer referenced by any object.
Otherwise these objects have a weak reference.
public static final void dump(java.io.PrintStream s)
CoordinateSystemPool to the
PrintStream given by s.
s - the PrintStream to dump the
CoordinateSystemPool to
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||