Class OrdinalSet<T>
java.lang.Object
com.ibm.wala.util.intset.OrdinalSet<T>
- All Implemented Interfaces:
Iterable<T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleancontainsAny(OrdinalSet<T> that) static <T> OrdinalSet<T> empty()static <T> booleanequals(OrdinalSet<T> a, OrdinalSet<T> b) @Nullable IntSetDangerous.@Nullable OrdinalSetMapping<T> static <T> OrdinalSet<T> intersect(OrdinalSet<T> A, OrdinalSet<T> B) booleanisEmpty()iterator()intsize()static <T> Collection<T> toCollection(OrdinalSet<T> instances) static <T> OrdinalSet<T> toOrdinalSet(Collection<T> c, OrdinalSetMapping<T> m) Precondition: the ordinal set mapping has an index for every element of c Convert a "normal" collection to an OrdinalSet, based on the given mapping.toString()static <T> OrdinalSet<T> unify(OrdinalSet<T> A, OrdinalSet<T> B) Creates the union of two ordinal sets.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Iterable
forEach, spliterator
-
Constructor Details
-
OrdinalSet
-
-
Method Details
-
empty
-
containsAny
-
size
public int size() -
iterator
-
intersect
- Returns:
- a new OrdinalSet instances
- Throws:
IllegalArgumentException- if A is null
-
equals
- Returns:
- true if the contents of two sets are equal
-
unify
Creates the union of two ordinal sets.- Parameters:
A- ordinal set aB- ordinal set b- Returns:
- union of a and b
- Throws:
IllegalArgumentException- iff A or B is null
-
toString
-
makeSparseCopy
-
getBackingSet
Dangerous. Added for performance reasons. Use this only if you really know what you are doing. -
contains
- Returns:
- true iff this set contains object
-
isEmpty
public boolean isEmpty() -
toCollection
- Throws:
NullPointerException- if instances is null
-
toOrdinalSet
Precondition: the ordinal set mapping has an index for every element of c Convert a "normal" collection to an OrdinalSet, based on the given mapping.- Throws:
IllegalArgumentException- if c is null
-
getMapping
-