Class CollectionUtils.SetOperationCardinalityHelper<O>
java.lang.Object
org.apache.commons.collections4.CollectionUtils.CardinalityHelper<O>
org.apache.commons.collections4.CollectionUtils.SetOperationCardinalityHelper<O>
- Type Parameters:
O- the element type
- All Implemented Interfaces:
Iterable<O>
- Enclosing class:
CollectionUtils
private static class CollectionUtils.SetOperationCardinalityHelper<O>
extends CollectionUtils.CardinalityHelper<O>
implements Iterable<O>
Helper class for set-related operations, e.g. union, subtract, intersection.
- Since:
- 1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionContains the unique elements of the two collections.Output collection.Fields inherited from class CollectionUtils.CardinalityHelper
cardinalityA, cardinalityB -
Constructor Summary
ConstructorsConstructorDescriptionSetOperationCardinalityHelper(Iterable<? extends O> a, Iterable<? extends O> b) Create a new set operation helper from the two collections. -
Method Summary
Modifier and TypeMethodDescriptioniterator()list()Returns the resulting collection.voidsetCardinality(O obj, int count) Add the objectcounttimes to the result collection.Methods inherited from class CollectionUtils.CardinalityHelper
freqA, freqB, max, minMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterable
forEach, spliterator
-
Field Details
-
elements
-
newList
-
-
Constructor Details
-
SetOperationCardinalityHelper
-
-
Method Details
-
iterator
-
setCardinality
Add the objectcounttimes to the result collection.- Parameters:
obj- the object to addcount- the count
-
list
-