net.sf.molae.pipe.tree
Class CompositionView.DefaultCompositionView

java.lang.Object
  extended by net.sf.molae.pipe.tree.CompositionView.DefaultCompositionView
All Implemented Interfaces:
CompositionView<Object>
Enclosing interface:
CompositionView<T>

public static class CompositionView.DefaultCompositionView
extends Object
implements CompositionView<Object>

Default implementation of a CompositionView. Use CompositionView.DEFAULT_COMPOSITION_VIEW to get the singleton instance of this class.


Nested Class Summary
 
Nested classes/interfaces inherited from interface net.sf.molae.pipe.tree.CompositionView
CompositionView.DefaultCompositionView
 
Field Summary
 
Fields inherited from interface net.sf.molae.pipe.tree.CompositionView
DEFAULT_COMPOSITION_VIEW
 
Method Summary
 Collection<?> getChildren(Object obj)
          Returns the components of the specified object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getChildren

public Collection<?> getChildren(Object obj)
Returns the components of the specified object.
  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.

Specified by:
getChildren in interface CompositionView<Object>
Parameters:
obj - an object
Returns:
the components of the specified object, null or an empty collection if it has no components.