O
- the element typeprivate static class CollectionUtils.CardinalityHelper<O>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) java.util.Map<O,java.lang.Integer> |
cardinalityA
Contains the cardinality for each object in collection A.
|
(package private) java.util.Map<O,java.lang.Integer> |
cardinalityB
Contains the cardinality for each object in collection B.
|
Constructor and Description |
---|
CardinalityHelper(java.lang.Iterable<? extends O> a,
java.lang.Iterable<? extends O> b)
Create a new CardinalityHelper for two collections.
|
Modifier and Type | Method and Description |
---|---|
int |
freqA(java.lang.Object obj)
Returns the frequency of this object in collection A.
|
int |
freqB(java.lang.Object obj)
Returns the frequency of this object in collection B.
|
private int |
getFreq(java.lang.Object obj,
java.util.Map<?,java.lang.Integer> freqMap) |
int |
max(java.lang.Object obj)
Returns the maximum frequency of an object.
|
int |
min(java.lang.Object obj)
Returns the minimum frequency of an object.
|
final java.util.Map<O,java.lang.Integer> cardinalityA
final java.util.Map<O,java.lang.Integer> cardinalityB
public final int max(java.lang.Object obj)
obj
- the objectpublic final int min(java.lang.Object obj)
obj
- the objectpublic int freqA(java.lang.Object obj)
obj
- the objectpublic int freqB(java.lang.Object obj)
obj
- the objectprivate int getFreq(java.lang.Object obj, java.util.Map<?,java.lang.Integer> freqMap)