public class CollectionUnion<T> extends java.lang.Object implements Reduction<java.util.Collection<T>>
Collection<T>
and the second
Collection<T>
which are sent as arguments. The reducer iterates
through every element of the second Collection<T>
, and tries
adding them to the first Collection<T>
. An attempt is successful
if and only if the corresponding element is not part of the first collection already!ArrayCOMBINE, BooleanBITAND, BooleanBITOR, BooleanBITXOR, BooleanLOGAND, BooleanLOGOR, ByteBITAND, ByteBITOR, ByteBITXOR, ByteMAX, ByteMIN, ByteMINUS, ByteMULTI, ByteSUM, DoubleBITAND, DoubleBITOR, DoubleBITXOR, DoubleLOGAND, DoubleLOGOR, DoubleMAX, DoubleMIN, DoubleMINUS, DoubleMULTI, DoubleSUM, FloatMAX, FloatMIN, FloatMINUS, FloatMULTI, FloatSUM, IntegerBITAND, IntegerBITOR, IntegerBITXOR, IntegerLOGAND, IntegerLOGOR, IntegerMAX, IntegerMIN, IntegerMINUS, IntegerMULTI, IntegerSUM, LongBITAND, LongBITOR, LongBITXOR, LongLOGOR, LongMAX, LongMIN, LongMINUS, LongMULTI, LongSUM, ShortBITAND, ShortBITOR, ShortBITXOR, ShortMAX, ShortMIN, ShortMINUS, ShortMULTI, ShortSUM
Constructor and Description |
---|
CollectionUnion() |
Modifier and Type | Method and Description |
---|---|
java.util.Collection<T> |
reduce(java.util.Collection<T> first,
java.util.Collection<T> second)
Specifies a reduction as defined by 2 elements into 1.
|
public java.util.Collection<T> reduce(java.util.Collection<T> first, java.util.Collection<T> second)
Reduction