public class IntersectionResult extends Object
Stores the size of set A, set B and the intersection of A and B
(|A ∩ B|).
This class is immutable.
| Constructor and Description |
|---|
IntersectionResult(int sizeA,
int sizeB,
int intersection)
Create the results for an intersection between two sets.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
int |
getIntersection()
Get the size of the intersection between set A and B.
|
int |
getSizeA()
Get the size of set A.
|
int |
getSizeB()
Get the size of set B.
|
int |
hashCode() |
String |
toString() |
public IntersectionResult(int sizeA,
int sizeB,
int intersection)
sizeA - the size of set A (|A|)sizeB - the size of set B (|B|)intersection - the size of the intersection of A and B (|A ∩ B|)IllegalArgumentException - if the sizes are negative or the intersection is greater
than the minimum of the two set sizesCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.