net.sf.molae.pipe.tree
Interface CompositionView<T>
- All Known Implementing Classes:
- CompositionView.DefaultCompositionView
public interface CompositionView<T>
A Composition View defines for each class the
children to be regarded.
- See Also:
Composition
,
DepthFirstIterator
DEFAULT_COMPOSITION_VIEW
static final CompositionView<Object> DEFAULT_COMPOSITION_VIEW
- The default composition view.
- If the specified object is a
Collection
,
it is returned itself.
- If it is a
Composition
, the component collection is
returned.
Any other object is not recognized and returns null
.
getChildren
Collection<? extends T> getChildren(T obj)
- Returns the components of the specified object.
- Parameters:
obj
- an object
- Returns:
- the components of the specified object,
null
or an empty collection
if it has no components.