public final class AvgOf extends NumberEnvelope
Here is how you can use it to find the mathematical average of numbers:
int avg = new AvgOf(1, 2, 3, 4).intValue(); long avg = new AvgOf(1L, 2L, 3L).longValue(); int avg = new AvgOf(numbers).intValue();
There is no thread-safety guarantee.
Constructor and Description |
---|
AvgOf(Iterable<? extends Number> src)
Ctor.
|
AvgOf(Number... src)
Ctor.
|
byteValue, doubleValue, equals, floatValue, hashCode, intValue, longValue, shortValue, toString
Copyright © 2017–2022 Cactoos. All rights reserved.