ezvcard
Class VCardDataType

java.lang.Object
  extended by ezvcard.VCardDataType

public class VCardDataType
extends Object

Defines the data type of a property's value.

Author:
Michael Angstadt

Field Summary
static VCardDataType BINARY
          Supported versions: 3.0
static VCardDataType BOOLEAN
          Supported versions: 4.0
static VCardDataType CONTENT_ID
          Supported versions: 2.1 (p.8-9)
static VCardDataType DATE
          Supported versions: 3.0, 4.0
static VCardDataType DATE_AND_OR_TIME
          Supported versions: 4.0
static VCardDataType DATE_TIME
          Supported versions: 3.0, 4.0
static VCardDataType FLOAT
          Supported versions: 4.0
static VCardDataType INTEGER
          Supported versions: 4.0
static VCardDataType LANGUAGE_TAG
          Supported versions: 4.0
static VCardDataType TEXT
          Supported versions: 2.1, 3.0, 4.0
static VCardDataType TIME
          Supported versions: 3.0, 4.0
static VCardDataType TIMESTAMP
          Supported versions: 4.0
static VCardDataType URI
          Supported versions: 3.0, 4.0
static VCardDataType URL
          Supported versions: 2.1 (p.18-9)
static VCardDataType UTC_OFFSET
          Supported versions: 4.0
 
Method Summary
static Collection<VCardDataType> all()
          Gets all of the data types that are defined as static constants in this class.
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.
 boolean isSupported(VCardVersion version)
          Determines if the data type is supported by the given vCard version.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

URL

public static final VCardDataType URL
Supported versions: 2.1 (p.18-9)


CONTENT_ID

public static final VCardDataType CONTENT_ID
Supported versions: 2.1 (p.8-9)


BINARY

public static final VCardDataType BINARY
Supported versions: 3.0


URI

public static final VCardDataType URI
Supported versions: 3.0, 4.0


TEXT

public static final VCardDataType TEXT
Supported versions: 2.1, 3.0, 4.0


DATE

public static final VCardDataType DATE
Supported versions: 3.0, 4.0


TIME

public static final VCardDataType TIME
Supported versions: 3.0, 4.0


DATE_TIME

public static final VCardDataType DATE_TIME
Supported versions: 3.0, 4.0


DATE_AND_OR_TIME

public static final VCardDataType DATE_AND_OR_TIME
Supported versions: 4.0


TIMESTAMP

public static final VCardDataType TIMESTAMP
Supported versions: 4.0


BOOLEAN

public static final VCardDataType BOOLEAN
Supported versions: 4.0


INTEGER

public static final VCardDataType INTEGER
Supported versions: 4.0


FLOAT

public static final VCardDataType FLOAT
Supported versions: 4.0


UTC_OFFSET

public static final VCardDataType UTC_OFFSET
Supported versions: 4.0


LANGUAGE_TAG

public static final VCardDataType LANGUAGE_TAG
Supported versions: 4.0

Method Detail

getName

public String getName()
Gets the name of the data type.

Returns:
the name of the data type (e.g. "text")

isSupported

public boolean isSupported(VCardVersion version)
Determines if the data type is supported by the given vCard version.

Parameters:
version - the vCard version
Returns:
true if it is supported, false if not

toString

public String toString()
Overrides:
toString in class Object

find

public static VCardDataType find(String dataType)
Searches for a data type that is defined as a static constant in this class.

Parameters:
dataType - the data type name (e.g. "text")
Returns:
the data type or null if not found

get

public static VCardDataType get(String dataType)
Searches for a data type and creates one if it cannot be found. All objects are guaranteed to be unique, so they can be compared with == equality.

Parameters:
dataType - data type name (e.g. "text")
Returns:
the data type

all

public static Collection<VCardDataType> all()
Gets all of the data types that are defined as static constants in this class.

Returns:
the data types


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