org.specrunner.util.composite.core
Class CompositeImpl<P extends IComposite<P,T>,T>

java.lang.Object
  extended by org.specrunner.util.composite.core.CompositeImpl<P,T>
Type Parameters:
P - The parent type.
T - The children type.
All Implemented Interfaces:
IComposite<P,T>
Direct Known Subclasses:
AnnotatorFactoryGroupImpl, AnnotatorGroupImpl, NamespaceProcessorGroupDefault, PluginFactoryGroupImpl, PluginGroupImpl, PresentationGroupImpl, ReporterFactoryGroupImpl, ReporterGroupImpl, SourceDumperGroupImpl, TransformerGroupImpl

public class CompositeImpl<P extends IComposite<P,T>,T>
extends Object
implements IComposite<P,T>

Default composite implementation.

Author:
Thiago Santos

Constructor Summary
CompositeImpl()
           
 
Method Summary
 P add(T child)
          Add a child and return the object itself.
 List<T> getChildren()
          Get the children list.
 boolean isEmpty()
          Check if object has children.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeImpl

public CompositeImpl()
Method Detail

isEmpty

public boolean isEmpty()
Description copied from interface: IComposite
Check if object has children.

Specified by:
isEmpty in interface IComposite<P extends IComposite<P,T>,T>
Returns:
true, if has none children, false, otherwise.

getChildren

public List<T> getChildren()
Description copied from interface: IComposite
Get the children list.

Specified by:
getChildren in interface IComposite<P extends IComposite<P,T>,T>
Returns:
The children list.

add

public P add(T child)
Description copied from interface: IComposite
Add a child and return the object itself.

Specified by:
add in interface IComposite<P extends IComposite<P,T>,T>
Parameters:
child - The child.
Returns:
The composite itself.


Copyright © 2014. All rights reserved.