net.sf.molae.pipe.tree
Interface CompositionView

All Known Implementing Classes:
CompositionView.DefaultCompositionView

public interface CompositionView

A Composition View defines for each class the children to be regarded.

See Also:
Composition, DepthFirstIterator

Inner Class Summary
static class CompositionView.DefaultCompositionView
          Default implementation of a CompositionView.
 
Field Summary
static CompositionView DEFAULT_COMPOSITION_VIEW
          The default composition view.
 
Method Summary
 Collection getChildren(Object obj)
          Returns the components of the specified object.
 

Field Detail

DEFAULT_COMPOSITION_VIEW

public static final CompositionView DEFAULT_COMPOSITION_VIEW
The default composition view.
  1. If the specified object is a Collection, it is returned itself.
  2. If it is a Composition, the component collection is returned.
Any other object is not recognized and returns null.
Method Detail

getChildren

public Collection getChildren(Object 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.