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