Package com.wowza.util
Class SetUtils
Object
com.wowza.util.SetUtils
Static utilities for standard set operations: union, intersection, difference, subset and superset.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Set<T>
Create difference of the 2 sets.static <T> Set<T>
intersection
(Set<T> set1, Set<T> set2) Create intersection of 2 sets.static <T> boolean
Determines if set1 is a subset of set2.static <T> boolean
isSuperset
(Set<T> set1, Set<T> set2) Determines if set1 is a superset of set2.static <T> Set<T>
Create union of 2 sets.
-
Constructor Details
-
SetUtils
public SetUtils()
-
-
Method Details
-
intersection
Create intersection of 2 sets.- Type Parameters:
T
- type of the sets- Parameters:
set1
- First setset2
- Second set- Returns:
- a new Set, containing the intersection of the 2 sets.
-
union
Create union of 2 sets.- Type Parameters:
T
- type of the sets- Parameters:
set1
- First setset2
- Second set- Returns:
- a new Set, containing the union of the 2 sets.
-
diff
Create difference of the 2 sets.- Type Parameters:
T
- type of the sets- Parameters:
set1
- First setset2
- Second set- Returns:
- a new Set, containing the set1 - set2.
-
isSubset
Determines if set1 is a subset of set2.- Type Parameters:
T
- type of the sets- Parameters:
set1
- First setset2
- Second set- Returns:
- true if set1 is subset of set2, otherwise false.
-
isSuperset
Determines if set1 is a superset of set2.- Type Parameters:
T
- type of the sets- Parameters:
set1
- First setset2
- Second set- Returns:
- true if set1 is superset of set2, otherwise false.
-