O - the element typeprivate static class CollectionUtils.SetOperationCardinalityHelper<O> extends CollectionUtils.CardinalityHelper<O> implements java.lang.Iterable<O>
| Modifier and Type | Field and Description |
|---|---|
private java.util.Set<O> |
elements
Contains the unique elements of the two collections.
|
private java.util.List<O> |
newList
Output collection.
|
cardinalityA, cardinalityB| Constructor and Description |
|---|
SetOperationCardinalityHelper(java.lang.Iterable<? extends O> a,
java.lang.Iterable<? extends O> b)
Create a new set operation helper from the two collections.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Iterator<O> |
iterator() |
java.util.Collection<O> |
list()
Returns the resulting collection.
|
void |
setCardinality(O obj,
int count)
Add the object
count times to the result collection. |
freqA, freqB, max, minprivate final java.util.Set<O> elements
private final java.util.List<O> newList
public java.util.Iterator<O> iterator()
iterator in interface java.lang.Iterable<O>public void setCardinality(O obj, int count)
count times to the result collection.obj - the object to addcount - the countpublic java.util.Collection<O> list()