ezvcard.types
Class InterestType

java.lang.Object
  extended by ezvcard.types.VCardType
      extended by ezvcard.types.TextType
          extended by ezvcard.types.InterestType
All Implemented Interfaces:
Comparable<VCardType>

public class InterestType
extends TextType

Defines a recreational activity that the person is interested in. For example, if a person has a INTEREST of "hockey", it would mean that he likes to watch hockey games. Someone who likes to actually play hockey would list "hockey" as a HOBBY (see HobbyType) instead.

 //someone who attends all of his favorite hockey team's games in person.
 VCard vcard = new VCard();
 InterestType interest = new InterestType("hockey");
 interest.setLevel(InterestLevelParameter.HIGH);
 vcard.addInterest(interest);
 

vCard property name: INTEREST

vCard versions: 4.0

Author:
Michael Angstadt
See Also:
RFC 6715

Field Summary
static String NAME
           
 
Fields inherited from class ezvcard.types.TextType
value
 
Fields inherited from class ezvcard.types.VCardType
group, subTypes, typeName
 
Constructor Summary
InterestType()
           
InterestType(String interest)
           
 
Method Summary
 String getAltId()
          Gets the ALTID.
 Integer getIndex()
          Gets the INDEX parameter.
 String getLanguage()
          Gets the language that the skill description is written in.
 InterestLevelParameter getLevel()
          Gets the level of the person's interest.
 Integer getPref()
          Gets the preference value.
 VCardVersion[] getSupportedVersions()
          Gets the vCard versions that support this type.
 String getType()
          Gets the TYPE parameter.
 void setAltId(String altId)
          Sets the ALTID.
 void setIndex(Integer index)
          Sets the INDEX parameter.
 void setLanguage(String language)
          Sets the language that the skill description is written in.
 void setLevel(InterestLevelParameter level)
          Sets the level of the person's interest.
 void setPref(Integer pref)
          Sets the preference value.
 void setType(String type)
          Sets the TYPE parameter.
 
Methods inherited from class ezvcard.types.TextType
doMarshalText, doMarshalXml, doUnmarshalHtml, doUnmarshalText, doUnmarshalXml, getValue, setValue
 
Methods inherited from class ezvcard.types.VCardType
compareTo, doMarshalSubTypes, getGroup, getQName, getSubTypes, getTypeName, marshalSubTypes, marshalText, marshalXml, setGroup, unmarshalHtml, unmarshalText, unmarshalXml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final String NAME
See Also:
Constant Field Values
Constructor Detail

InterestType

public InterestType()

InterestType

public InterestType(String interest)
Parameters:
interest - the hobby (e.g. "wind surfing")
Method Detail

getSupportedVersions

public VCardVersion[] getSupportedVersions()
Description copied from class: VCardType
Gets the vCard versions that support this type.

Overrides:
getSupportedVersions in class VCardType
Returns:
the vCard versions that support this type.

getLevel

public InterestLevelParameter getLevel()
Gets the level of the person's interest.

Returns:
the interest level (e.g. "low") or null if not set
See Also:
VCardSubTypes.getLevel()

setLevel

public void setLevel(InterestLevelParameter level)
Sets the level of the person's interest.

Parameters:
level - the level (e.g. "low") or null to remove
See Also:
VCardSubTypes.setLevel(java.lang.String)

getIndex

public Integer getIndex()
Gets the INDEX parameter.

Returns:
the INDEX or null if not set
See Also:
VCardSubTypes.getIndex()

setIndex

public void setIndex(Integer index)
Sets the INDEX parameter.

Parameters:
index - the INDEX or null to remove
See Also:
VCardSubTypes.setIndex(java.lang.Integer)

getType

public String getType()
Gets the TYPE parameter.

Returns:
the TYPE value (typically, this will be either "work" or "home") or null if it doesn't exist

setType

public void setType(String type)
Sets the TYPE parameter.

Parameters:
type - the TYPE value (this should be either "work" or "home") or null to remove

getLanguage

public String getLanguage()
Gets the language that the skill description is written in.

Returns:
the language or null if not set
See Also:
VCardSubTypes.getLanguage()

setLanguage

public void setLanguage(String language)
Sets the language that the skill description is written in.

Parameters:
language - the language or null to remove
See Also:
VCardSubTypes.setLanguage(java.lang.String)

getPref

public Integer getPref()
Gets the preference value.

vCard versions: 4.0

Returns:
the preference value or null if it doesn't exist
See Also:
VCardSubTypes.getPref()

setPref

public void setPref(Integer pref)
Sets the preference value.

vCard versions: 4.0

Parameters:
pref - the preference value or null to remove
See Also:
VCardSubTypes.setPref(java.lang.Integer)

getAltId

public String getAltId()
Gets the ALTID.

vCard versions: 4.0

Returns:
the ALTID or null if it doesn't exist
See Also:
VCardSubTypes.getAltId()

setAltId

public void setAltId(String altId)
Sets the ALTID.

vCard versions: 4.0

Parameters:
altId - the ALTID or null to remove
See Also:
VCardSubTypes.setAltId(java.lang.String)


Copyright © 2012-2013. All Rights Reserved.