com.ibm.icu.text
Enum SimpleDateFormat.ContextValue

java.lang.Object
  extended by java.lang.Enum<SimpleDateFormat.ContextValue>
      extended by com.ibm.icu.text.SimpleDateFormat.ContextValue
All Implemented Interfaces:
Serializable, Comparable<SimpleDateFormat.ContextValue>
Enclosing class:
SimpleDateFormat

public static enum SimpleDateFormat.ContextValue
extends Enum<SimpleDateFormat.ContextValue>

Values for date format context types

Status:
Draft ICU 49.

Enum Constant Summary
CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE
          CAPITALIZATION value if a date (or date symbol) is to be formatted with capitalization appropriate for the beginning of a sentence.
CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE
          CAPITALIZATION value if a date (or date symbol) is to be formatted with capitalization appropriate for the middle of a sentence.
CAPITALIZATION_FOR_STANDALONE
          CAPITALIZATION value if a date (or date symbol) is to be formatted with capitalization appropriate for stand-alone usage such as an isolated name on a calendar page.
CAPITALIZATION_FOR_UI_LIST_OR_MENU
          CAPITALIZATION value if a date (or date symbol) is to be formatted with capitalization appropriate for a user-interface list or menu item.
UNKNOWN
          Value for any ContextType (such as CAPITALIZATION) if the relevant context to be used in formatting a date is unknown (this is the default value for any ContextType when no value has been explicitly specified for that ContextType).
 
Method Summary
static SimpleDateFormat.ContextValue valueOf(String name)
          Returns the enum constant of this type with the specified name.
static SimpleDateFormat.ContextValue[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

UNKNOWN

public static final SimpleDateFormat.ContextValue UNKNOWN
Value for any ContextType (such as CAPITALIZATION) if the relevant context to be used in formatting a date is unknown (this is the default value for any ContextType when no value has been explicitly specified for that ContextType).

Status:
Draft ICU 49.

CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE

public static final SimpleDateFormat.ContextValue CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE
CAPITALIZATION value if a date (or date symbol) is to be formatted with capitalization appropriate for the middle of a sentence.

Status:
Draft ICU 49.

CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE

public static final SimpleDateFormat.ContextValue CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE
CAPITALIZATION value if a date (or date symbol) is to be formatted with capitalization appropriate for the beginning of a sentence.

Status:
Draft ICU 49.

CAPITALIZATION_FOR_UI_LIST_OR_MENU

public static final SimpleDateFormat.ContextValue CAPITALIZATION_FOR_UI_LIST_OR_MENU
CAPITALIZATION value if a date (or date symbol) is to be formatted with capitalization appropriate for a user-interface list or menu item.

Status:
Draft ICU 49.

CAPITALIZATION_FOR_STANDALONE

public static final SimpleDateFormat.ContextValue CAPITALIZATION_FOR_STANDALONE
CAPITALIZATION value if a date (or date symbol) is to be formatted with capitalization appropriate for stand-alone usage such as an isolated name on a calendar page.

Status:
Draft ICU 49.
Method Detail

values

public static SimpleDateFormat.ContextValue[] 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 (SimpleDateFormat.ContextValue c : SimpleDateFormat.ContextValue.values())
    System.out.println(c);

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

valueOf

public static SimpleDateFormat.ContextValue valueOf(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright (c) 2012 IBM Corporation and others.