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)
Constructs the results for an intersection between two sets.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
int |
getIntersection()
Gets the size of the intersection between set A and B.
|
int |
getSizeA()
Gets the size of set A.
|
int |
getSizeB()
Gets 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 sizespublic int getIntersection()
|A ∩ B|public int getSizeA()
public int getSizeB()
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.