Enum NumberFormat
- java.lang.Object
-
- java.lang.Enum<NumberFormat>
-
- org.cyclos.model.system.languages.NumberFormat
-
- All Implemented Interfaces:
Serializable,Comparable<NumberFormat>,HasMessageKey
public enum NumberFormat extends Enum<NumberFormat> implements HasMessageKey
Possible formats for numbers
-
-
Enum Constant Summary
Enum Constants Enum Constant Description COMMA_AS_DECIMALPERIOD_AS_DECIMAL
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NumberFormatfromDecimalSeparator(char decimalSeparator)Returns the format for the given decimal separator, or throwsIllegalArgumentExceptionif there's no matchchargetDecimalSeparator()chargetGroupingSeparator()MessageKeygetMessageKey()static NumberFormatvalueOf(String name)Returns the enum constant of this type with the specified name.static NumberFormat[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
COMMA_AS_DECIMAL
public static final NumberFormat COMMA_AS_DECIMAL
-
PERIOD_AS_DECIMAL
public static final NumberFormat PERIOD_AS_DECIMAL
-
-
Method Detail
-
values
public static NumberFormat[] 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 c : NumberFormat.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 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 nameNullPointerException- if the argument is null
-
fromDecimalSeparator
public static NumberFormat fromDecimalSeparator(char decimalSeparator)
Returns the format for the given decimal separator, or throwsIllegalArgumentExceptionif there's no match
-
getDecimalSeparator
public char getDecimalSeparator()
-
getGroupingSeparator
public char getGroupingSeparator()
-
getMessageKey
public MessageKey getMessageKey()
- Specified by:
getMessageKeyin interfaceHasMessageKey
-
-