Package org.apache.commons.collections4
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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionContains the unique elements of the two collections.Output collection.Fields inherited from class org.apache.commons.collections4.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.void
setCardinality
(O obj, int count) Add the objectcount
times to the result collection.Methods inherited from class org.apache.commons.collections4.CollectionUtils.CardinalityHelper
freqA, freqB, max, min
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
elements
Contains the unique elements of the two collections. -
newList
Output collection.
-
-
Constructor Details
-
SetOperationCardinalityHelper
Create a new set operation helper from the two collections.- Parameters:
a
- the first collectionb
- the second collection
-
-
Method Details