# Property (iCal4j VCard 0.9.5 API)
Date: 2012-01-29

net.fortuna.ical4j.vcard

## Class Property

- java.lang.Object
- - net.fortuna.ical4j.vcard.Property

All Implemented Interfaces:
  Serializable

Direct Known Subclasses:
  Address, Agent, BDay, Birth, CalAdrUri, CalUri, Categories, Clazz, DDay, Death, Email, FbUrl, Fn, Gender, Geo, Impp, Key, Kind, Label, Lang, Logo, Member, N, Name, Nickname, Note, Org, Photo, ProdId, Related, Revision, Role, SortString, Sound, Source, Telephone, Title, Tz, Uid, Url, Version

    public abstract class Property
    extends Object
    implements Serializable

A vCard property. $Id$ Created on 21/08/2008

Author:
  Ben
See Also:
  Serialized Form

### Nested Class Summary

Nested Classes
`static class` `Property.Id` Enumeration of property identifiers.

### Field Summary

Fields
`protected static String` `ILLEGAL_PARAMETER_MESSAGE`

### Constructor Summary

Constructors
`` `Property(Group group, Property.Id id)`
`protected` `Property(Group group, Property.Id id, List<Parameter> parameters)`
`` `Property(Group group, String extendedName)`
`` `Property(Group group, String extendedName, List<Parameter> parameters)`
`` `Property(Property.Id id)`
`protected` `Property(Property.Id id, List<Parameter> parameters)`
`` `Property(String extendedName)`
`` `Property(String extendedName, List<Parameter> parameters)`

### Method Summary

Methods
`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(Object obj)`
`Parameter` `getExtendedParameter(String name)` Returns the first non-standard parameter with a matching name.
`List<Parameter>` `getExtendedParameters(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.
`List<Parameter>` `getParameters()`
`List<Parameter>` `getParameters(Parameter.Id id)` Returns a list of parameters matching the specified identifier.
`abstract String` `getValue()`
`int` `hashCode()`
`String` `toString()`
`abstract void` `validate()`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Field Detail

#### ILLEGAL_PARAMETER_MESSAGE

    protected static final String ILLEGAL_PARAMETER_MESSAGE

See Also:
  Constant Field Values

### Constructor Detail

#### Property

    public Property(String extendedName)

Parameters:
  `extendedName` - a non-standard property name

#### Property

    public Property(Group group,
            String extendedName)

Parameters:
  `group` - a property group
  `extendedName` - the non-standard property name

#### Property

    public Property(String extendedName,
            List<Parameter> parameters)

Parameters:
  `extendedName` - a non-standard property name
  `parameters` - property parameters

#### Property

    public Property(Group group,
            String extendedName,
            List<Parameter> parameters)

Parameters:
  `group` - a property group
  `extendedName` - the non-standard property name
  `parameters` - property parameters

#### Property

    public Property(Property.Id id)

Parameters:
  `id` - the property type

#### Property

    public Property(Group group,
            Property.Id id)

Parameters:
  `group` - a property group
  `id` - a standard property identifier

#### Property

    protected Property(Property.Id id,
            List<Parameter> parameters)

Parameters:
  `id` - a standard property identifier
  `parameters` - property parameters

#### Property

    protected Property(Group group,
            Property.Id id,
            List<Parameter> parameters)

Parameters:
  `group` - a property group
  `id` - a standard property identifier
  `parameters` - property parameters

### Method Detail

#### getGroup

    public final Group getGroup()

Returns:
  the group

#### getId

    public final Property.Id getId()

Returns:
  the id

#### getParameters

    public final List<Parameter> getParameters()

Returns:
  the parameters

#### getParameters

    public final List<Parameter> getParameters(Parameter.Id id)

Returns a list of parameters matching the specified identifier.

Parameters:
  `id` - a parameter identifier
Returns:
  a list of parameters

#### getParameter

    public final Parameter getParameter(Parameter.Id id)

Returns the first parameter with a matching identifier.

Parameters:
  `id` - a parameter identifier
Returns:
  the first matching parameter, or null if no parameters with the specified identifier are found

#### getExtendedParameters

    public final List<Parameter> getExtendedParameters(String name)

Returns a list of non-standard parameters matching the specified name.

Parameters:
  `name` - a non-standard parameter name
Returns:
  a list of parameters

#### getExtendedParameter

    public final Parameter getExtendedParameter(String name)

Returns the first non-standard parameter with a matching name.

Parameters:
  `name` - a non-standard parameter name
Returns:
  the first matching parameter, or null if no non-standard parameters with the specified name are found

#### getValue

    public abstract String getValue()

Returns:
  a string representaion of the property propertyName

#### validate

    public abstract void validate()
                           throws net.fortuna.ical4j.model.ValidationException

Throws:
  `net.fortuna.ical4j.model.ValidationException` - where the property fails validation rules

#### assertParametersEmpty

    protected final void assertParametersEmpty()
                                        throws net.fortuna.ical4j.model.ValidationException

Throws:
  `net.fortuna.ical4j.model.ValidationException` - where the parameter list is not empty

#### assertTextParameter

    protected final void assertTextParameter(Parameter param)
                                      throws net.fortuna.ical4j.model.ValidationException

Parameters:
  `param` - a parameter to validate
Throws:
  `net.fortuna.ical4j.model.ValidationException` - where the specified parameter is not a text parameter

#### assertTypeParameter

    protected final void assertTypeParameter(Parameter param)
                                      throws net.fortuna.ical4j.model.ValidationException

Parameters:
  `param` - a parameter to validate
Throws:
  `net.fortuna.ical4j.model.ValidationException` - where the specified parameter is not a type parameter

#### assertPidParameter

    protected final void assertPidParameter(Parameter param)
                                     throws net.fortuna.ical4j.model.ValidationException

Parameters:
  `param` - a parameter to validate
Throws:
  `net.fortuna.ical4j.model.ValidationException` - where the specified parameter is not a PID parameter

#### assertPrefParameter

    protected final void assertPrefParameter(Parameter param)
                                      throws net.fortuna.ical4j.model.ValidationException

Parameters:
  `param` - a parameter to validate
Throws:
  `net.fortuna.ical4j.model.ValidationException` - where the specified parameter is not a Pref parameter

#### assertOneOrLess

    protected final void assertOneOrLess(Parameter.Id paramId)
                                  throws net.fortuna.ical4j.model.ValidationException

Parameters:
  `paramId` - a parameter identifier to validate from
Throws:
  `net.fortuna.ical4j.model.ValidationException` - where there is not one or less of the specified parameter in the parameter list

#### equals

    public boolean equals(Object obj)

Overrides:
  `equals` in class `Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### toString

    public final String toString()

Overrides:
  `toString` in class `Object`
Returns:
  a vCard-compliant string representation of the property