corny.addressbook.data
Enum MultiValue.MultiValueLabel

java.lang.Object
  extended by java.lang.Enum<MultiValue.MultiValueLabel>
      extended by corny.addressbook.data.MultiValue.MultiValueLabel
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<MultiValue.MultiValueLabel>
Enclosing class:
MultiValue<T>

public static enum MultiValue.MultiValueLabel
extends java.lang.Enum<MultiValue.MultiValueLabel>

Enumeration which declares the default MultiValue labels

Author:
Corny

Enum Constant Summary
HOME
          Home label
HOME_FAX
          Home fax label
IPHONE
          iPhone label
MAIN
          Main label
MOBILE
          Mobile phone label
MOBILE_ME
          iPhone label
OTHER
          "Other" label
PAGER
          Pager label
WORK
          Work label
WORK_FAX
          Work fax label
 
Method Summary
 void addRegularExpressionsTo(java.util.Map<java.lang.String,MultiValue.MultiValueLabel> labelMap)
          Used by the FilterCreator process to read the regular expressions which represent this label.
 boolean appliesToProperty(ContactProperty property)
          Returns true if this is a proper label for the given ContactProperty.
abstract  java.lang.String getDefaultRegex()
          Returns the default regular expression used in the SearchDialog.
 java.lang.String getHumanReadableName()
           
abstract  java.lang.String getInternalRepresentation()
           
 java.lang.String toString()
           
static MultiValue.MultiValueLabel valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static MultiValue.MultiValueLabel[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

HOME

public static final MultiValue.MultiValueLabel HOME
Home label


WORK

public static final MultiValue.MultiValueLabel WORK
Work label


MOBILE

public static final MultiValue.MultiValueLabel MOBILE
Mobile phone label


HOME_FAX

public static final MultiValue.MultiValueLabel HOME_FAX
Home fax label


WORK_FAX

public static final MultiValue.MultiValueLabel WORK_FAX
Work fax label


MAIN

public static final MultiValue.MultiValueLabel MAIN
Main label


PAGER

public static final MultiValue.MultiValueLabel PAGER
Pager label


IPHONE

public static final MultiValue.MultiValueLabel IPHONE
iPhone label


MOBILE_ME

public static final MultiValue.MultiValueLabel MOBILE_ME
iPhone label


OTHER

public static final MultiValue.MultiValueLabel OTHER
"Other" label

Method Detail

values

public static MultiValue.MultiValueLabel[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (MultiValue.MultiValueLabel c : MultiValue.MultiValueLabel.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static MultiValue.MultiValueLabel valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getHumanReadableName

public java.lang.String getHumanReadableName()
Returns:
The human readable, localized name of this MultiValueLabel

addRegularExpressionsTo

public final void addRegularExpressionsTo(java.util.Map<java.lang.String,MultiValue.MultiValueLabel> labelMap)
Used by the FilterCreator process to read the regular expressions which represent this label.

Parameters:
labelMap - Map to write the expressions to

getDefaultRegex

public abstract java.lang.String getDefaultRegex()
Returns the default regular expression used in the SearchDialog.

Returns:
Default regular expression

appliesToProperty

public boolean appliesToProperty(ContactProperty property)
Returns true if this is a proper label for the given ContactProperty.

Parameters:
property - ContactProperty
Returns:
True if this is a proper label for the given ContactProperty

getInternalRepresentation

public abstract java.lang.String getInternalRepresentation()
Returns:
The internal representation for the communication with Apple's Address Book.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Enum<MultiValue.MultiValueLabel>