public final class NumberOf extends Number implements Scalar<Number>
Float
.
There is no thread-safety guarantee.
This class implements Scalar
, which throws a checked
Exception
. This may not be convenient in many cases. To make
it more convenient and get rid of the checked exception you can
use UncheckedScalar
or IoCheckedScalar
decorators.
Scalar.NoNulls<T>
Constructor and Description |
---|
NumberOf(String txt)
Ctor.
|
NumberOf(Text text)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
double |
doubleValue() |
float |
floatValue() |
int |
intValue() |
long |
longValue() |
Number |
value()
Convert it to the value.
|
byteValue, shortValue
public NumberOf(String txt)
txt
- Number-stringpublic NumberOf(Text text)
text
- Number-textpublic float floatValue()
floatValue
in class Number
public double doubleValue()
doubleValue
in class Number
Copyright © 2017 Cactoos. All rights reserved.