|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
O
- Object typepublic interface Hierarchy<O>
This interface represents an (external) hierarchy of objects. It can contain
arbitrary objects, BUT the hierarchy has to be accessed using the hierarchy
object, i.e. hierarchy.getChildren(object);
.
See Hierarchical
for an interface for objects with an internal
hierarchy (where you can use object.getChildren();
)
Method Summary | |
---|---|
List<O> |
getChildren(O self)
Get children list. |
List<O> |
getParents(O self)
Get parents list. |
IterableIterator<O> |
iterAncestors(O self)
Iterate ancestors (recursive parents) |
IterableIterator<O> |
iterDescendants(O self)
Iterate descendants (recursive children) |
int |
numChildren(O self)
Get number of children |
int |
numParents(O self)
Get number of (direct) parents |
Method Detail |
---|
int numChildren(O self)
self
- object to get number of children for
List<O> getChildren(O self)
self
- object to get children for
IterableIterator<O> iterDescendants(O self)
self
- object to get descendants for
int numParents(O self)
self
- reference object
List<O> getParents(O self)
self
- object to get parents for
IterableIterator<O> iterAncestors(O self)
self
- object to get ancestors for
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |