Enum Class NumberStyle
- All Implemented Interfaces:
Serializable, Comparable<NumberStyle>, java.lang.constant.Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic LongFunction<String> newUniformFormatter(long rangeSize) Similar totoUniformString(long, long)but return a "formatter" with the specified range size.static StringtoUniformString(long value, long rangeSize) Creates String:s like "0067" and "0004" rather than "67" and "4" given an integer range (max number of integers).static NumberStyleReturns the enum constant of this class with the specified name.static NumberStyle[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CURRENCY
-
GENERAL
-
INTEGER
-
PERCENT
-
SCIENTIFIC
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
newUniformFormatter
Similar totoUniformString(long, long)but return a "formatter" with the specified range size.- Parameters:
rangeSize- The max number of integers- Returns:
- An integer-to-string function
-
toUniformString
Creates String:s like "0067" and "0004" rather than "67" and "4" given an integer range (max number of integers). -
getFormat
-
getFormat
-