FromDigits
extends Object with SerializableSupertypes
Object, SerializableMembers
Decimal
[T]A subclass of FromDigits
that also allows to convert number
literals containing a decimal point ".".
A subclass of FromDigits
that also allows to convert number
literals containing a decimal point ".".
Floating
[T]A subclass of FromDigits
that allows also to convert number
literals containing a decimal point "." or an
exponent ('e' | 'E')['+' | '-']digit digit*
.
A subclass of FromDigits
that allows also to convert number
literals containing a decimal point "." or an
exponent ('e' | 'E')['+' | '-']digit digit*
.
FromDigitsException
The base type for exceptions that can be thrown from
fromDigits
conversions
The base type for exceptions that can be thrown from
fromDigits
conversions
MalformedNumber
Thrown if digit string is not legal for the given type
Thrown if digit string is not legal for the given type
MalformedNumber
Thrown if digit string is not legal for the given type
Thrown if digit string is not legal for the given type
NumberTooLarge
Thrown if value of result does not fit into result type's range
Thrown if value of result does not fit into result type's range
NumberTooLarge
Thrown if value of result does not fit into result type's range
Thrown if value of result does not fit into result type's range
NumberTooSmall
Thrown in case of numeric underflow (e.g. a non-zero floating point literal that produces a zero value)
Thrown in case of numeric underflow (e.g. a non-zero floating point literal that produces a zero value)
NumberTooSmall
Thrown in case of numeric underflow (e.g. a non-zero floating point literal that produces a zero value)
Thrown in case of numeric underflow (e.g. a non-zero floating point literal that produces a zero value)
WithRadix
[T]A subclass of FromDigits
that also allows to convert whole number literals
with a radix other than 10
A subclass of FromDigits
that also allows to convert whole number literals
with a radix other than 10
zeroFloat
: RegexdoubleFromDigits
( digits: String ) : DoubleConvert digit string to Double number
Convert digit string to Double number
floatFromDigits
( digits: String ) : FloatConvert digit string to Float number
Convert digit string to Float number
intFromDigits
( digits: String , radix: Int ) : IntConvert digit string to Int number
Convert digit string to Int number
intFromDigits$default$2
: IntConvert digit string to Int number
Convert digit string to Int number
integerFromDigits
( digits: String , radix: Int , limit: Long ) : LongConvert digits and radix to integer value (either int or Long) This is tricky because of the max negative value. Note: We cannot use java.lang.Integer.v...
Convert digits and radix to integer value (either int or Long) This is tricky because of the max negative value. Note: We cannot use java.lang.Integer.valueOf or java.lang.Long.valueOf since these do not handle unsigned hex numbers greater than the maximal value correctly.
longFromDigits
( digits: String , radix: Int ) : LongConvert digit string to Long number
Convert digit string to Long number
longFromDigits$default$2
: IntConvert digit string to Long number
Convert digit string to Long number