|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.composite.util.CompositeHierarchy
This class provides useful functionalities for working with hierarchies
of BaseComposite objects.
| Constructor Summary | |
CompositeHierarchy()
Constructor for CompositeHierarchy. |
|
| Method Summary | |
void |
clear()
Clears the List containing the hierarchy. |
CompositeHierarchy |
eliminateChildren()
This method removes all those paths from the hierarchy, whose parents are also part of the hierarchy. |
CompositeHierarchy |
eliminateNonMovable()
|
CompositeHierarchyPath |
findHierarchyPath(BaseComposite bcomposite)
Returns the CompositeHierarchyPath that is holding the
given BaseComposite. |
CompositeHierarchyPath |
getHierarchyPathAt(int index)
Returns the CompositeHierarchyPath at the given index of
this CompositeHierarchy. |
int |
indexOf(CompositeHierarchyPath path)
Returns the index of the given CompositeHierarchyPath in
this CompositeHierarchy. |
boolean |
isEmpty()
Indicating whether this CompositeHierarchy is empty. |
boolean |
isEqualTo(CompositeHierarchy other)
|
CompositeHierarchyIterator |
iterator()
Returns a CompositeHierarchyIterator for this
CompositeHierarchy. |
int |
size()
Returns the number of elements in this hierarchy. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public CompositeHierarchy()
CompositeHierarchy.
| Method Detail |
public boolean isEmpty()
CompositeHierarchy is empty.
true, if this hierarchy is empty.public boolean isEqualTo(CompositeHierarchy other)
public void clear()
List containing the hierarchy.
public int size()
public int indexOf(CompositeHierarchyPath path)
CompositeHierarchyPath in
this CompositeHierarchy.
path - the CompositeHierarchyPath to return the index
for.
CompositeHierarchyPath;
-1, if it is not located in this
CompositeHierarchypublic CompositeHierarchyPath getHierarchyPathAt(int index)
CompositeHierarchyPath at the given index of
this CompositeHierarchy.
index - the position of the CompositeHierarchy to
retrieve.
CompositeHierarchyPath at the given index.public CompositeHierarchyPath findHierarchyPath(BaseComposite bcomposite)
CompositeHierarchyPath that is holding the
given BaseComposite.
bcomposite - the BaseComposite to look up the
CompositeHierarchyPath for.
CompositeHierarchyPath holding the given
BaseComposite.public CompositeHierarchy eliminateNonMovable()
public CompositeHierarchy eliminateChildren()
CompositeHierarchy instance that
contains the CompositeHierarchyPath objects that have been
removed from this CompositeHierarchy instance
CompositeHierarchy instance
that contains the removed children of this onepublic CompositeHierarchyIterator iterator()
CompositeHierarchyIterator for this
CompositeHierarchy.
CompositeHierarchyIterator for this
CompositeHierarchy.public java.lang.String toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||