|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
E
- The type of elements to be reducedpublic interface Reduction<E>
Define a reduction of two items into one. This definition may then be used to reduce a collection
of items into one item. This is primarily intended for reducing the results from a multi-task
(see TaskIDGroup.reduce(Reduction)
).
This approach allows the programmer to easily define complex reductions that could even involve
entire data structures, for example concatenating lists or maps. A reduction must be:
Field Summary | |
---|---|
static Reduction<java.lang.Object[]> |
ArrayCOMBINE
Combines the elements from the arrays into a new array. |
static Reduction<java.lang.Boolean> |
BooleanAND
Performs a Boolean AND |
static Reduction<java.lang.Boolean> |
BooleanOR
Performs a Boolean OR |
static Reduction<java.lang.Double> |
DoubleMAX
Perform a maximum reduction for Double values. |
static Reduction<java.lang.Double> |
DoubleMIN
Perform a minimum reduction for Double values. |
static Reduction<java.lang.Double> |
DoubleSUM
Perform a sum reduction for Double values. |
static Reduction<java.lang.Integer> |
IntegerMAX
Perform a maximum reduction for Integer values. |
static Reduction<java.lang.Integer> |
IntegerMIN
Perform a minimum reduction for Integer values. |
static Reduction<java.lang.Integer> |
IntegerSUM
Perform a sum reduction for Integer values. |
Method Summary | |
---|---|
E |
combine(E a,
E b)
Specifies a reduction as defined by 2 elements into 1. |
Field Detail |
---|
static final Reduction<java.lang.Integer> IntegerMIN
Integer
values.
static final Reduction<java.lang.Integer> IntegerMAX
Integer
values.
static final Reduction<java.lang.Integer> IntegerSUM
Integer
values.
static final Reduction<java.lang.Double> DoubleMIN
Double
values.
static final Reduction<java.lang.Double> DoubleMAX
Double
values.
static final Reduction<java.lang.Double> DoubleSUM
Double
values.
static final Reduction<java.lang.Object[]> ArrayCOMBINE
static final Reduction<java.lang.Boolean> BooleanOR
static final Reduction<java.lang.Boolean> BooleanAND
Method Detail |
---|
E combine(E a, E b)
a
and b
) makes no difference.
a
- The first element in the reductionb
- The second element in the reduction
a
with b
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |