public final class MaxOf extends NumberEnvelope
Here is how you can use it to summarize numbers:
int sum = new MaxOf(1, 2, 3, 4).intValue(); long sum = new MaxOf(1L, 2L, 3L).longValue(); int sum = new MaxOf(numbers.toArray(new Integer[numbers.size()])).intValue();
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.
UncheckedScalar
,
IoCheckedScalar
,
Serialized FormConstructor and Description |
---|
MaxOf(Double... src)
Ctor.
|
MaxOf(Float... src)
Ctor.
|
MaxOf(Integer... src)
Ctor.
|
MaxOf(Iterable<Number> src)
Ctor.
|
MaxOf(Long... src)
Ctor.
|
doubleValue, floatValue, intValue, longValue
byteValue, shortValue
Copyright © 2017–2018 Cactoos. All rights reserved.