org.pentaho.reporting.engine.classic.core.modules.parser.ext.factory.elements
Class ElementFactoryCollector

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.modules.parser.ext.factory.elements.ElementFactoryCollector
All Implemented Interfaces:
Serializable, ElementFactory

public class ElementFactoryCollector
extends Object
implements ElementFactory

An element factory that encapsulates multiple element factories.

Author:
Thomas Morgner
See Also:
Serialized Form

Constructor Summary
ElementFactoryCollector()
          Creates a new element factory.
 
Method Summary
 void addFactory(ElementFactory factory)
          Adds an element factory.
 boolean equals(Object o)
          Indicated whether an other object is equal to this one.
 Element getElementForType(String type)
          Returns an element for the given type.
 Iterator getFactories()
          Returns an iterator that provides access to the factories.
 int hashCode()
          Computes an hashcode for this factory.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ElementFactoryCollector

public ElementFactoryCollector()
Creates a new element factory.

Method Detail

addFactory

public void addFactory(ElementFactory factory)
Adds an element factory.

Parameters:
factory - the factory.

getFactories

public Iterator getFactories()
Returns an iterator that provides access to the factories.

Returns:
The iterator.

getElementForType

public Element getElementForType(String type)
Returns an element for the given type.

Specified by:
getElementForType in interface ElementFactory
Parameters:
type - the content type.
Returns:
The element.

equals

public boolean equals(Object o)
Indicated whether an other object is equal to this one.

Overrides:
equals in class Object
Parameters:
o - the other object.
Returns:
true, if the object is equal, false otherwise.
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Computes an hashcode for this factory.

Overrides:
hashCode in class Object
Returns:
the hashcode.
See Also:
Object.hashCode()