com.ibm.icu.text
Enum NumberFormat.CompactStyle

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

public static enum NumberFormat.CompactStyle
extends Enum<NumberFormat.CompactStyle>

Style parameter for CompactDecimalFormat.

Status:
Draft ICU 49.

Enum Constant Summary
LONG
          Longer version, like "1.2 trillion", if available.
SHORT
          Short version, like "1.2T"
 
Method Summary
static NumberFormat.CompactStyle valueOf(String name)
          Returns the enum constant of this type with the specified name.
static NumberFormat.CompactStyle[] 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

SHORT

public static final NumberFormat.CompactStyle SHORT
Short version, like "1.2T"

Status:
Draft ICU 49.

LONG

public static final NumberFormat.CompactStyle LONG
Longer version, like "1.2 trillion", if available. May return same result as SHORT if not.

Status:
Draft ICU 49.
Method Detail

values

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

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

valueOf

public static NumberFormat.CompactStyle 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.