com.jrefinery.report.io.ext.factory.elements
Class ElementFactoryCollector

java.lang.Object
  |
  +--com.jrefinery.report.io.ext.factory.elements.ElementFactoryCollector
All Implemented Interfaces:
ElementFactory

public class ElementFactoryCollector
extends java.lang.Object
implements ElementFactory

An element factory that encapsulates multiple element factories.

Author:
Thomas Morgner

Constructor Summary
ElementFactoryCollector()
          Creates a new element factory.
 
Method Summary
 void addFactory(ElementFactory factory)
          Adds an element factory.
 Element getElementForType(java.lang.String type)
          Returns an element for the given type.
 java.util.Iterator getFactories()
          Returns an iterator that provides access to the factories.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, 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 java.util.Iterator getFactories()
Returns an iterator that provides access to the factories.

Returns:
The iterator.

getElementForType

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

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