ezvcard.property
Class Kind

java.lang.Object
  extended by ezvcard.property.VCardProperty
      extended by ezvcard.property.SimpleProperty<String>
          extended by ezvcard.property.TextProperty
              extended by ezvcard.property.Kind
All Implemented Interfaces:
Comparable<VCardProperty>

public class Kind
extends TextProperty

Defines the type of entity that this vCard represents, such as an individual or an organization.

Setting the KIND

 //use static methods to create a Kind object
 VCard vcard = new VCard();
 Kind kind = Kind.individual();
 vcard.setKind(kind);
 

Getting the KIND

 //use "is*" methods to determine the Kind value
 VCard vcard = ...
 Kind kind = vcard.getKind();
 if (kind != null){
   if (kind.isIndividual()){
     ...
   } else if (kind.isGroup()){
     ...
   }
   ...
 }
 

Property name: KIND

Supported versions: 4.0

Author:
Michael Angstadt

Field Summary
static String APPLICATION
           
static String DEVICE
           
static String GROUP
           
static String INDIVIDUAL
           
static String LOCATION
           
static String ORG
           
 
Fields inherited from class ezvcard.property.SimpleProperty
value
 
Fields inherited from class ezvcard.property.VCardProperty
group, parameters
 
Constructor Summary
Kind(String kind)
          Creates a kind property.
 
Method Summary
 Set<VCardVersion> _supportedVersions()
           Gets the vCard versions that support this property.
static Kind application()
          Creates a new KIND property whose value is set to "application".
static Kind device()
          Creates a new KIND property whose value is set to "device".
static Kind group()
          Creates a new KIND property whose value is set to "group".
static Kind individual()
          Creates a new KIND property whose value is set to "individual".
 boolean isApplication()
          Determines if the value is set to "application".
 boolean isDevice()
          Determines if the value is set to "device".
 boolean isGroup()
          Determines if the value is set to "group".
 boolean isIndividual()
          Determines if the value is set to "individual".
 boolean isLocation()
          Determines if the value is set to "location".
 boolean isOrg()
          Determines if the value is set to "org".
static Kind location()
          Creates a new KIND property whose value is set to "location".
static Kind org()
          Creates a new KIND property whose value is set to "org".
 
Methods inherited from class ezvcard.property.SimpleProperty
_validate, getValue, setValue
 
Methods inherited from class ezvcard.property.VCardProperty
addParameter, compareTo, getGroup, getParameter, getParameters, getParameters, getSupportedVersions, removeParameter, setGroup, setParameter, setParameters, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INDIVIDUAL

public static final String INDIVIDUAL
See Also:
Constant Field Values

GROUP

public static final String GROUP
See Also:
Constant Field Values

ORG

public static final String ORG
See Also:
Constant Field Values

LOCATION

public static final String LOCATION
See Also:
Constant Field Values

APPLICATION

public static final String APPLICATION
See Also:
Constant Field Values

DEVICE

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

Kind

public Kind(String kind)
Creates a kind property. Use of this constructor is discouraged. Please use one of the static factory methods to create a new KIND property.

Parameters:
kind - the kind value (e.g. "group")
Method Detail

_supportedVersions

public Set<VCardVersion> _supportedVersions()
Description copied from class: VCardProperty

Gets the vCard versions that support this property.

This method should be overridden by child classes if the property does not support all vCard versions. The default implementation of this method returns all vCard versions.

Overrides:
_supportedVersions in class VCardProperty
Returns:
the vCard versions that support this property.

isIndividual

public boolean isIndividual()
Determines if the value is set to "individual".

Returns:
true if the value is "individual", false if not

isGroup

public boolean isGroup()
Determines if the value is set to "group".

Returns:
true if the value is "group", false if not

isOrg

public boolean isOrg()
Determines if the value is set to "org".

Returns:
true if the value is "org", false if not

isLocation

public boolean isLocation()
Determines if the value is set to "location".

Returns:
true if the value is "location", false if not

isApplication

public boolean isApplication()
Determines if the value is set to "application".

Returns:
true if the value is "application", false if not
See Also:
RFC 6473

isDevice

public boolean isDevice()
Determines if the value is set to "device".

Returns:
true if the value is "device", false if not
See Also:
RFC 6869

individual

public static Kind individual()
Creates a new KIND property whose value is set to "individual".

Returns:
the new KIND property

group

public static Kind group()
Creates a new KIND property whose value is set to "group".

Returns:
the new KIND property

org

public static Kind org()
Creates a new KIND property whose value is set to "org".

Returns:
the new KIND property

location

public static Kind location()
Creates a new KIND property whose value is set to "location".

Returns:
the new KIND property

application

public static Kind application()
Creates a new KIND property whose value is set to "application".

Returns:
the new KIND property
See Also:
RFC 6473

device

public static Kind device()
Creates a new KIND property whose value is set to "device".

Returns:
the new KIND property
See Also:
RFC 6869


Copyright © 2012-2014 Michael Angstadt. All Rights Reserved.