public class Kind extends TextProperty
Defines the type of entity that this vCard represents, such as an individual or an organization.
Code sample (creating)
VCard vcard = new VCard(); Kind kind = Kind.individual(); vcard.setKind(kind);
Code sample (retrieving)
VCard vcard = ... Kind kind = vcard.getKind(); if (kind.isIndividual()){ //vCard contains information on an individual person } else if (kind.isGroup()){ //vCard contains information on a group of people } //etc
Property name: KIND
Supported versions: 4.0
Modifier and Type | Field and Description |
---|---|
static String |
APPLICATION |
static String |
DEVICE |
static String |
GROUP |
static String |
INDIVIDUAL |
static String |
LOCATION |
static String |
ORG |
value
group, parameters
Constructor and Description |
---|
Kind(String kind)
Creates a kind property.
|
Modifier and Type | Method and Description |
---|---|
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".
|
_validate, getValue, setValue
addParameter, compareTo, getGroup, getParameter, getParameters, getParameters, getSupportedVersions, removeParameter, setGroup, setParameter, setParameters, validate
public static final String INDIVIDUAL
public static final String GROUP
public static final String ORG
public static final String LOCATION
public static final String APPLICATION
public static final String DEVICE
public Kind(String kind)
kind
- the kind value (e.g. "group")public Set<VCardVersion> _supportedVersions()
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.
_supportedVersions
in class VCardProperty
public boolean isIndividual()
public boolean isGroup()
public boolean isOrg()
public boolean isLocation()
public boolean isApplication()
public boolean isDevice()
public static Kind individual()
public static Kind group()
public static Kind org()
public static Kind location()
public static Kind application()
This software is published under the BSD license. Copyright © 2003-${build.year}, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.