public class SetUnion<T> extends java.lang.Object implements Reduction<java.util.Set<T>>
Set<T>s. It basically iterates
through every element of the second Set<T>, and tries
adding them to the first Set<T>. The nature of Set
does not allow duplicate elements to be added.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 |
|---|
SetUnion() |
| Modifier and Type | Method and Description |
|---|---|
java.util.Set<T> |
reduce(java.util.Set<T> first,
java.util.Set<T> second)
Specifies a reduction as defined by 2 elements into 1.
|
public java.util.Set<T> reduce(java.util.Set<T> first, java.util.Set<T> second)
Reduction