Class LongSetUtil
java.lang.Object
com.ibm.wala.util.intset.LongSetUtil
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic LongSet
static int
binarySearch
(long[] data, long key, int low, int high) static LongSet
Compute the asymmetric difference of two sets, a \ b.static LongSet
diff
(LongSet A, LongSet B, @Nullable MutableLongSetFactory factory) Compute the asymmetric difference of two sets, a \ b.static @Nullable MutableLongSetFactory
static MutableLongSet
make()
static @Nullable MutableLongSet
makeMutableCopy
(LongSet set) This method constructs an appropriate mutable copy of set.static MutableLongSet
removeAll
(MutableLongSet A, LongSet B) Subtract two sets, i.e.static void
setDefaultLongSetFactory
(MutableLongSetFactory defaultLongSetFactory)
-
Field Details
-
INT_SET_FACTORY_CONFIG_PROPERTY_NAME
- See Also:
-
-
Constructor Details
-
LongSetUtil
public LongSetUtil()
-
-
Method Details
-
make
-
makeMutableCopy
public static @Nullable MutableLongSet makeMutableCopy(LongSet set) throws IllegalArgumentException, UnimplementedError This method constructs an appropriate mutable copy of set.- Returns:
- a new MutableLongSet object with the same value as set
- Throws:
UnimplementedError
- if (not ( set instanceof com.ibm.wala.util.intset.SparseLongSet ) ) and (not ( set instanceof com.ibm.wala.util.intset.BitVectorLongSet ) ) and (not ( set instanceof com.ibm.wala.util.intset.BimodalMutableLongSet ) ) and (not ( set instanceof com.ibm.wala.util.intset.DebuggingMutableLongSet ) ) and (not ( set instanceof com.ibm.wala.util.intset.SemiSparseMutableLongSet ) ) and (not ( set instanceof com.ibm.wala.util.intset.MutableSharedBitVectorLongSet ) )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 A == null || B == null
-
binarySearch
public static int binarySearch(long[] data, long key, int low, int high) throws IllegalArgumentException - Returns:
- index \in [low,high] s.t. data[index] = key, or -1 if not found
- Throws:
IllegalArgumentException
-
getDefaultLongSetFactory
-
setDefaultLongSetFactory
-
add
- Returns:
- a new sparse int set which adds j to s
- Throws:
IllegalArgumentException
- if s == null
-