public final class SumOfDoubleScalar extends Object implements Scalar<Double>
Here is how you can use it to summarize double numbers:
double sum = new SumOfDoubleScalar(() -> 1.1,() -> 2.1, () -> 3.1).value();
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.
There is no thread-safety guarantee.
Scalar.NoNulls<T>
Constructor and Description |
---|
SumOfDoubleScalar(Scalar<Double>... src)
Ctor.
|
@SafeVarargs public SumOfDoubleScalar(Scalar<Double>... src)
src
- Varargs of Scalar to sum up values fromCopyright © 2017–2018 Cactoos. All rights reserved.