Package org.ojalgo.type.format
Enum Class NumberStyle
- All Implemented Interfaces:
Serializable
,Comparable<NumberStyle>
,Constable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final class
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LongFunction
<String> newUniformFormatter
(long rangeSize) Similar totoUniformString(long, long)
but return a "formatter" with the specified range size.static String
toUniformString
(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 NumberStyle
Returns 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
-
-
Constructor Details
-
NumberStyle
private NumberStyle()
-
-
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
-