@SupportedVersions(value=V4_0) 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(Kind original)
Copy constructor.
|
Kind(String kind)
Creates a kind property.
|
Modifier and Type | Method and Description |
---|---|
static Kind |
application()
Creates a new KIND property whose value is set to "application".
|
Kind |
copy()
Creates a copy of this property object.
|
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, equals, getValue, hashCode, setValue, toStringValues
addParameter, compareTo, getGroup, getParameter, getParameters, getParameters, getSupportedVersions, isSupportedBy, removeParameter, setGroup, setParameter, setParameters, toString, 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 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()
public static Kind device()
public Kind copy()
VCardProperty
Creates a copy of this property object.
The default implementation of this method uses reflection to look for a copy constructor. Child classes SHOULD override this method to avoid the performance overhead involved in using reflection.
The child class's copy constructor, if present, MUST invoke the
VCardProperty.VCardProperty(VCardProperty)
super constructor to ensure that
the group name and parameters are also copied.
This method MUST be overridden by the child class if the child class does
not have a copy constructor. Otherwise, an
UnsupportedOperationException
will be thrown when an attempt is
made to copy the property (such as in the VCard
class's copy constructor
).
copy
in class VCardProperty
Copyright © 2012–2023 Michael Angstadt. All rights reserved.