public class VCardDataType extends Object
Modifier and Type | Field and Description |
---|---|
static VCardDataType |
BINARY
A non-textual value, such as a picture or sound file.
|
static VCardDataType |
BOOLEAN
A boolean value ("true" or "false").
|
static VCardDataType |
CONTENT_ID
Refers to a MIME entity within an email.
|
static VCardDataType |
DATE
A date that does not have a time component (for example, "2015-02-16").
|
static VCardDataType |
DATE_AND_OR_TIME
Any sort of date/time combination.
|
static VCardDataType |
DATE_TIME
A date with a time component (for example, "2015-02-16 08:34:00").
|
static VCardDataType |
FLOAT
A floating-point value (for example, "3.14").
|
static VCardDataType |
INTEGER
An integer value (for example, "42").
|
static VCardDataType |
LANGUAGE_TAG
A standardized abbreviation for a language (for example, "en-us" for
American English).
|
static VCardDataType |
TEXT
A plain text value.
|
static VCardDataType |
TIME
A time that does not have a date component (for example, "08:34:00").
|
static VCardDataType |
TIMESTAMP
A specific moment in time.
|
static VCardDataType |
URI
A uniform resource identifier (for example,
"http://www.example.com/image.jpg").
|
static VCardDataType |
URL
A uniform resource locator (for example,
"http://www.example.com/image.jpg").
|
static VCardDataType |
UTC_OFFSET
An offset from UTC time, in hours and minutes (for example, "-0500").
|
Modifier and Type | Method and Description |
---|---|
static Collection<VCardDataType> |
all()
Gets all of the data types that are defined as static constants in this
class.
|
boolean |
equals(Object obj) |
static VCardDataType |
find(String dataType)
Searches for a data type that is defined as a static constant in this
class.
|
static VCardDataType |
get(String dataType)
Searches for a data type and creates one if it cannot be found.
|
String |
getName()
Gets the name of the data type.
|
VCardVersion[] |
getSupportedVersions()
Gets the vCard versions that support this data type.
|
int |
hashCode() |
boolean |
isSupportedBy(VCardVersion version)
Determines if this data type is supported by the given vCard version.
|
String |
toString() |
@SupportedVersions(value=V2_1) public static final VCardDataType URL
URI
.@SupportedVersions(value=V2_1) public static final VCardDataType CONTENT_ID
@SupportedVersions(value=V3_0) public static final VCardDataType BINARY
@SupportedVersions(value={V3_0,V4_0}) public static final VCardDataType URI
URL
instead.public static final VCardDataType TEXT
@SupportedVersions(value={V3_0,V4_0}) public static final VCardDataType DATE
@SupportedVersions(value={V3_0,V4_0}) public static final VCardDataType TIME
@SupportedVersions(value={V3_0,V4_0}) public static final VCardDataType DATE_TIME
@SupportedVersions(value=V4_0) public static final VCardDataType DATE_AND_OR_TIME
@SupportedVersions(value=V4_0) public static final VCardDataType TIMESTAMP
@SupportedVersions(value=V4_0) public static final VCardDataType BOOLEAN
@SupportedVersions(value=V4_0) public static final VCardDataType INTEGER
@SupportedVersions(value=V4_0) public static final VCardDataType FLOAT
@SupportedVersions(value=V4_0) public static final VCardDataType UTC_OFFSET
@SupportedVersions(value=V4_0) public static final VCardDataType LANGUAGE_TAG
public String getName()
public VCardVersion[] getSupportedVersions()
Gets the vCard versions that support this data type.
The supported versions are defined by assigning a
SupportedVersions
annotation to the data type's static field (for
example, CONTENT_ID
). Dynamically-created data
types (i.e. non-standard data types) are considered to be supported by
all versions.
public boolean isSupportedBy(VCardVersion version)
Determines if this data type is supported by the given vCard version.
The supported versions are defined by assigning a
SupportedVersions
annotation to the data type's static field (for
example, CONTENT_ID
). Dynamically-created data
types (i.e. non-standard data types) are considered to be supported by
all versions.
version
- the vCard versionpublic static VCardDataType find(String dataType)
dataType
- the data type name (e.g. "text")public static VCardDataType get(String dataType)
==
equality.dataType
- data type name (e.g. "text")public static Collection<VCardDataType> all()
Copyright © 2012–2023 Michael Angstadt. All rights reserved.