Package com.android.dx.util
Class BitIntSet
java.lang.Object
com.android.dx.util.BitIntSet
- All Implemented Interfaces:
IntSet
A set of integers, represented by a bit set
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(int value) Adds an int to a setint
elements()
Returns the count of unique elements in this set.boolean
has
(int value) Checks to see if a value is in the setiterator()
Iterates the setvoid
Mergesother
into this set, so this set becomes the union of the two.void
remove
(int value) Removes an int from a set.toString()
-
Constructor Details
-
BitIntSet
public BitIntSet(int max) Constructs an instance.- Parameters:
max
- the maximum value of ints in this set.
-
-
Method Details
-
add
public void add(int value) Adds an int to a set -
remove
public void remove(int value) Removes an int from a set. -
has
public boolean has(int value) Checks to see if a value is in the set -
merge
Mergesother
into this set, so this set becomes the union of the two. -
elements
public int elements()Returns the count of unique elements in this set. -
iterator
Iterates the set -
toString
-