Class IntSetUtil
java.lang.Object
com.ibm.wala.util.intset.IntSetUtil
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic IntSet
static int
binarySearch
(int[] data, int key, int low, int high) static IntSet
Compute the asymmetric difference of two sets, a \ b.static IntSet
diff
(IntSet A, IntSet B, MutableIntSetFactory<?> factory) Compute the asymmetric difference of two sets, a \ b.static MutableIntSetFactory
<?> static MutableIntSet
make()
static MutableIntSet
make
(int[] initial) static IntSet
static MutableIntSet
makeMutableCopy
(IntSet set) This method constructs an appropriate mutable copy of set.static MutableIntSet
removeAll
(MutableIntSet A, IntSet B) Subtract two sets, i.e.static void
setDefaultIntSetFactory
(MutableIntSetFactory<?> defaultIntSetFactory) static int[]
-
Field Details
-
INT_SET_FACTORY_CONFIG_PROPERTY_NAME
- See Also:
-
-
Method Details
-
make
-
make
-
make
-
makeMutableCopy
@NullUnmarked public static MutableIntSet makeMutableCopy(IntSet set) throws IllegalArgumentException, UnimplementedError This method constructs an appropriate mutable copy of set.- Returns:
- a new
MutableIntSet
object with the same value as set - Throws:
UnimplementedError
- if we haven't supported the set type yet.IllegalArgumentException
- if set == null
-
diff
-
diff
Compute the asymmetric difference of two sets, a \ b. -
removeAll
Subtract two sets, i.e. a = a \ b.- Throws:
IllegalArgumentException
- if B == null
-
binarySearch
public static int binarySearch(int[] data, int key, int low, int high) throws IllegalArgumentException - Returns:
- index \in [low,high] s.t. data[index] = key, or -1 if not found
- Throws:
IllegalArgumentException
-
getDefaultIntSetFactory
- Returns:
- Returns the defaultIntSetFactory.
-
setDefaultIntSetFactory
- Parameters:
defaultIntSetFactory
- The defaultIntSetFactory to set.
-
add
- Returns:
- a new sparse int set which adds j to s
- Throws:
IllegalArgumentException
- if s == null
-
toArray
-