|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.crwth.systems.Space
A generic Space container. Space holds Masses and Springs. Collectors add objects to a Space,
Physics changes them, and Viewers observe.
| Constructor Summary | |
Space()
|
|
Space(Mass root)
|
|
| Method Summary | |
void |
add(Object object)
Adds an Object to Space. |
void |
addMass(Mass mass)
Adds a Mass to Space. |
void |
addSpring(Spring spring)
Adds a Spring to Space. |
int |
getDimension()
Returns the dimension of the Space. |
Mass |
getMass(String name)
Retrieves a Mass from Space based on the Mass's name. |
Iterator |
getMassIterator()
Returns a Set of the Masses in the Space. |
Mass |
getRoot()
Returns the Mass that is the root of the Space, if any. |
Spring |
getSpring(String name)
Retrieves a Spring from Space based on the Spring's name. |
Iterator |
getSpringIterator()
Returns a Set for the Springs in the Space. |
void |
setRoot(Mass mass)
Sets the root object in the Space. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Space()
public Space(Mass root)
| Method Detail |
public void add(Object object)
object - the Object to add.public void addMass(Mass mass)
mass - the Mass to add.public Mass getMass(String name)
name - the Mass's name.
name,
or null if none exists.public Iterator getMassIterator()
Collectors or Physics.
public void addSpring(Spring spring)
spring - the Spring to add.public Spring getSpring(String name)
name - the Spring's name.
name,
or null if none exists.public Iterator getSpringIterator()
Collectors or Physics.
public void setRoot(Mass mass)
mass - the Mass to set as the root.public Mass getRoot()
null if not.public int getDimension()
public String toString()
toString in class Object
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||