public abstract class Property
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
Property.Id
Enumeration of property identifiers.
|
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
ILLEGAL_PARAMETER_MESSAGE |
Modifier | Constructor and Description |
---|---|
|
Property(Group group,
Property.Id id) |
protected |
Property(Group group,
Property.Id id,
java.util.List<Parameter> parameters) |
|
Property(Group group,
java.lang.String extendedName) |
|
Property(Group group,
java.lang.String extendedName,
java.util.List<Parameter> parameters) |
|
Property(Property.Id id) |
protected |
Property(Property.Id id,
java.util.List<Parameter> parameters) |
|
Property(java.lang.String extendedName) |
|
Property(java.lang.String extendedName,
java.util.List<Parameter> parameters) |
Modifier and Type | Method and Description |
---|---|
protected void |
assertOneOrLess(Parameter.Id paramId) |
protected void |
assertParametersEmpty() |
protected void |
assertPidParameter(Parameter param) |
protected void |
assertPrefParameter(Parameter param) |
protected void |
assertTextParameter(Parameter param) |
protected void |
assertTypeParameter(Parameter param) |
boolean |
equals(java.lang.Object obj) |
Parameter |
getExtendedParameter(java.lang.String name)
Returns the first non-standard parameter with a matching name.
|
java.util.List<Parameter> |
getExtendedParameters(java.lang.String name)
Returns a list of non-standard parameters matching the specified name.
|
Group |
getGroup() |
Property.Id |
getId() |
Parameter |
getParameter(Parameter.Id id)
Returns the first parameter with a matching identifier.
|
java.util.List<Parameter> |
getParameters() |
java.util.List<Parameter> |
getParameters(Parameter.Id id)
Returns a list of parameters matching the specified identifier.
|
abstract java.lang.String |
getValue() |
int |
hashCode() |
java.lang.String |
toString() |
abstract void |
validate() |
protected static final java.lang.String ILLEGAL_PARAMETER_MESSAGE
public Property(java.lang.String extendedName)
extendedName
- a non-standard property namepublic Property(Group group, java.lang.String extendedName)
group
- a property groupextendedName
- the non-standard property namepublic Property(java.lang.String extendedName, java.util.List<Parameter> parameters)
extendedName
- a non-standard property nameparameters
- property parameterspublic Property(Group group, java.lang.String extendedName, java.util.List<Parameter> parameters)
group
- a property groupextendedName
- the non-standard property nameparameters
- property parameterspublic Property(Property.Id id)
id
- the property typepublic Property(Group group, Property.Id id)
group
- a property groupid
- a standard property identifierprotected Property(Property.Id id, java.util.List<Parameter> parameters)
id
- a standard property identifierparameters
- property parametersprotected Property(Group group, Property.Id id, java.util.List<Parameter> parameters)
group
- a property groupid
- a standard property identifierparameters
- property parameterspublic final Group getGroup()
public final Property.Id getId()
public final java.util.List<Parameter> getParameters()
public final java.util.List<Parameter> getParameters(Parameter.Id id)
id
- a parameter identifierpublic final Parameter getParameter(Parameter.Id id)
id
- a parameter identifierpublic final java.util.List<Parameter> getExtendedParameters(java.lang.String name)
name
- a non-standard parameter namepublic final Parameter getExtendedParameter(java.lang.String name)
name
- a non-standard parameter namepublic abstract java.lang.String getValue()
public abstract void validate() throws net.fortuna.ical4j.validate.ValidationException
net.fortuna.ical4j.validate.ValidationException
- where the property fails validation rulesprotected final void assertParametersEmpty() throws net.fortuna.ical4j.validate.ValidationException
net.fortuna.ical4j.validate.ValidationException
- where the parameter list is not emptyprotected final void assertTextParameter(Parameter param) throws net.fortuna.ical4j.validate.ValidationException
param
- a parameter to validatenet.fortuna.ical4j.validate.ValidationException
- where the specified parameter is not a text parameterprotected final void assertTypeParameter(Parameter param) throws net.fortuna.ical4j.validate.ValidationException
param
- a parameter to validatenet.fortuna.ical4j.validate.ValidationException
- where the specified parameter is not a type parameterprotected final void assertPidParameter(Parameter param) throws net.fortuna.ical4j.validate.ValidationException
param
- a parameter to validatenet.fortuna.ical4j.validate.ValidationException
- where the specified parameter is not a PID parameterprotected final void assertPrefParameter(Parameter param) throws net.fortuna.ical4j.validate.ValidationException
param
- a parameter to validatenet.fortuna.ical4j.validate.ValidationException
- where the specified parameter is not a Pref parameterprotected final void assertOneOrLess(Parameter.Id paramId) throws net.fortuna.ical4j.validate.ValidationException
paramId
- a parameter identifier to validate fromnet.fortuna.ical4j.validate.ValidationException
- where there is not one or less of the specified
parameter in the parameter listpublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public final java.lang.String toString()
toString
in class java.lang.Object