net.fortuna.ical4j.model
Class ComponentFactory

java.lang.Object
  extended bynet.fortuna.ical4j.model.ComponentFactory

public final class ComponentFactory
extends Object

A factory for creating iCalendar components. Note that if relaxed parsing is enabled (via specifying the system property: icalj.parsing.relaxed=true) illegal component names are allowed.

Author:
Ben Fortuna

Method Summary
 Component createComponent(String name)
           
 Component createComponent(String name, PropertyList properties)
          Creates a component.
 Component createComponent(String name, PropertyList properties, ComponentList components)
          Creates a component which contains sub-components.
static ComponentFactory getInstance()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ComponentFactory getInstance()
Returns:
Returns the instance.

createComponent

public Component createComponent(String name)

createComponent

public Component createComponent(String name,
                                 PropertyList properties)
Creates a component.

Parameters:
name - name of the component
properties - a list of component properties
Returns:
a component

createComponent

public Component createComponent(String name,
                                 PropertyList properties,
                                 ComponentList components)
Creates a component which contains sub-components. Currently the only such component is VTIMEZONE.

Parameters:
name - name of the component
properties - a list of component properties
components - a list of sub-components (namely standard/daylight timezones)
Returns:
a component