|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectutil.CollectionMath
public class CollectionMath
Utility math methods defined over collections of elements
Constructor Summary | |
---|---|
CollectionMath()
|
Method Summary | |
---|---|
static Float |
sumFloat(FnIterable<Float> it)
|
static FnIterable<Float> |
sumFloat(FnIterable<Float> c1,
FnIterable<Float> c2)
Pair-wise sum of two sequences of floats. |
static Float |
sumFloat(Iterable<Float> c)
|
static Collection<Float> |
sumFloat(Iterable<Float> c1,
Iterable<Float> c2)
Pair-wise sum of two iterators over floats. |
static Integer |
sumInteger(FnIterable<Integer> it)
|
static FnIterable<Integer> |
sumInteger(FnIterable<Integer> c1,
FnIterable<Integer> c2)
Pair-wise sum of two sequences of integers. |
static Integer |
sumInteger(Iterable<Integer> c)
|
static Collection<Integer> |
sumInteger(Iterable<Integer> c1,
Collection<Integer> c2)
Pair-wise sum of two iterators over integers. |
static Long |
sumLong(FnIterable<Long> it)
|
static FnIterable<Long> |
sumLong(FnIterable<Long> c1,
FnIterable<Long> c2)
Pair-wise sum of two sequences of longs. |
static Long |
sumLong(Iterable<Long> c)
|
static Collection<Long> |
sumLong(Iterable<Long> c1,
Iterable<Long> c2)
Pair-wise sum of two iterators over longs. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CollectionMath()
Method Detail |
---|
public static Integer sumInteger(Iterable<Integer> c)
c
- a collection of integers
public static Integer sumInteger(FnIterable<Integer> it)
it
- a sequence of integers
public static Collection<Integer> sumInteger(Iterable<Integer> c1, Collection<Integer> c2)
c1
- first iteratorc2
- second iterator
public static FnIterable<Integer> sumInteger(FnIterable<Integer> c1, FnIterable<Integer> c2)
sumInteger({a1, a2, a3, ...}, {b1, b2, b3, ...}) ==> {a1+b1, a2+b2, a3+b3, ...}
c1
- first sequencec2
- second sequence
public static Long sumLong(Iterable<Long> c)
c
- a collection of longs
public static Long sumLong(FnIterable<Long> it)
it
- a sequence of longs
public static Collection<Long> sumLong(Iterable<Long> c1, Iterable<Long> c2)
c1
- first iteratorc2
- second iterator
public static FnIterable<Long> sumLong(FnIterable<Long> c1, FnIterable<Long> c2)
sumLong({a1, a2, a3, ...}, {b1, b2, b3, ...}) ==> {a1+b1, a2+b2, a3+b3, ...}
c1
- first sequencec2
- second sequence
public static Float sumFloat(Iterable<Float> c)
c
- a collection of floats
public static Float sumFloat(FnIterable<Float> it)
it
- a sequence of floats
public static Collection<Float> sumFloat(Iterable<Float> c1, Iterable<Float> c2)
c1
- first iteratorc2
- second iterator
public static FnIterable<Float> sumFloat(FnIterable<Float> c1, FnIterable<Float> c2)
sumFloat({a1, a2, a3, ...}, {b1, b2, b3, ...}) ==> {a1+b1, a2+b2, a3+b3, ...}
c1
- first sequencec2
- second sequence
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |