Modifier and Type | Field and Description |
---|---|
static String |
VALARM |
static String |
VCALENDAR |
static String |
VEVENT |
static String |
VFREEBUSY |
static String |
VJOURNAL |
static String |
VTIMEZONE |
static String |
VTODO |
Constructor and Description |
---|
Component(String name,
ICalendar.Component parent)
Creates a new component with the provided name.
|
Modifier and Type | Method and Description |
---|---|
void |
addChild(ICalendar.Component child)
Adds a child component to this component.
|
void |
addProperty(ICalendar.Property prop)
Adds a Property to this component.
|
List<ICalendar.Component> |
getComponents()
Returns a list of the Component children of this component.
|
ICalendar.Property |
getFirstProperty(String name)
Returns the first property with the specified name.
|
String |
getName()
Returns the name of the component.
|
protected LinkedList<ICalendar.Component> |
getOrCreateChildren()
Helper that lazily gets/creates the list of children.
|
ICalendar.Component |
getParent()
Returns the parent of this component.
|
List<ICalendar.Property> |
getProperties(String name)
Returns a list of properties with the specified name.
|
Set<String> |
getPropertyNames()
Returns a set of the property names within this component.
|
String |
toString()
Returns a string representation of the object.
|
void |
toString(StringBuilder sb)
Helper method that appends this component to a StringBuilder.
|
public static final String VCALENDAR
public static final String VEVENT
public static final String VTODO
public static final String VJOURNAL
public static final String VFREEBUSY
public static final String VTIMEZONE
public static final String VALARM
public Component(String name, ICalendar.Component parent)
name
- The name of the component.public String getName()
public ICalendar.Component getParent()
protected LinkedList<ICalendar.Component> getOrCreateChildren()
public void addChild(ICalendar.Component child)
child
- The child component.public List<ICalendar.Component> getComponents()
public void addProperty(ICalendar.Property prop)
prop
- public Set<String> getPropertyNames()
public List<ICalendar.Property> getProperties(String name)
name
- The name of the property that should be returned.public ICalendar.Property getFirstProperty(String name)
name
- The name of the property that should be returned.public String toString()
Object
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
public void toString(StringBuilder sb)