Package com.android.dx.util
Interface IntSet
- All Known Implementing Classes:
BitIntSet
,ListIntSet
public interface IntSet
A set of integers
-
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.
-
Method Details
-
add
void add(int value) Adds an int to a set- Parameters:
value
- int to add
-
remove
void remove(int value) Removes an int from a set.- Parameters:
value
- int to remove
-
has
boolean has(int value) Checks to see if a value is in the set- Parameters:
value
- int to check- Returns:
- true if in set
-
merge
Mergesother
into this set, so this set becomes the union of the two.- Parameters:
other
-non-null;
other set to merge with.
-
elements
int elements()Returns the count of unique elements in this set.- Returns:
> = 0;
count of unique elements
-
iterator
IntIterator iterator()Iterates the set- Returns:
non-null;
a set iterator
-