public final class MinOf extends NumberEnvelope
Here is how you can use it to find the min of a set of numbers:
int min = new MinOf(1, 2, 3, 4).intValue(); long min = new MinOf(1L, 2L, 3L).longValue(); int min = new MinOf(numbers.toArray(new Integer[numbers.size()])).intValue();
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 the UncheckedScalar
decorator. Or you may use
IoCheckedScalar
to wrap it in an IOException.
Constructor and Description |
---|
MinOf(Double... src)
Ctor.
|
MinOf(Float... src)
Ctor.
|
MinOf(Integer... src)
Ctor.
|
MinOf(Iterable<Number> src)
Ctor.
|
MinOf(Long... src)
Ctor.
|
doubleValue, floatValue, intValue, longValue, value
byteValue, shortValue
Copyright © 2017–2019 Cactoos. All rights reserved.