Top Description Fields Constructors Methods
org.droidparts.dexmaker.dx.util

public Class BitIntSet

extends Object
implements IntSet
Class Inheritance
All Implemented Interfaces
org.droidparts.dexmaker.dx.util.IntSet
Imports
java.util.NoSuchElementException

A set of integers, represented by a bit set

Field Summary

Modifier and TypeField and Description
pack-priv int[]
bits

also accessed in ListIntSet

Constructor Summary

AccessConstructor and Description
public
BitIntSet(int
the maximum value of ints in this set.
max
)

Constructs an instance.

Method Summary

Modifier and TypeMethod and Description
public void
add(int
int to add
value
)

Implements org.droidparts.dexmaker.dx.util.IntSet.add.

Adds an int to a set
public int
elements()

Implements org.droidparts.dexmaker.dx.util.IntSet.elements.

Returns the count of unique elements in this set.
private void
ensureCapacity(int
>= 0; value to represent
value
)

Ensures that the bit set has the capacity to represent the given value.

public boolean
has(int
int to check
value
)

Implements org.droidparts.dexmaker.dx.util.IntSet.has.

Checks to see if a value is in the set
public IntIterator
public void
merge(IntSet
non-null; other set to merge with.
other
)

Implements org.droidparts.dexmaker.dx.util.IntSet.merge.

Merges other into this set, so this set becomes the union of the two.
public void
remove(int
int to remove
value
)

Implements org.droidparts.dexmaker.dx.util.IntSet.remove.

Removes an int from a set.
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

bitsback to summary
pack-priv int[] bits

also accessed in ListIntSet

Constructor Detail

BitIntSetback to summary
public BitIntSet(int max)

Constructs an instance.

Parameters
max:int

the maximum value of ints in this set.

Method Detail

addback to summary
public void add(int value)

Implements org.droidparts.dexmaker.dx.util.IntSet.add.

Doc from org.droidparts.dexmaker.dx.util.IntSet.add.

Adds an int to a set

Parameters
value:int

int to add

elementsback to summary
public int elements()

Implements org.droidparts.dexmaker.dx.util.IntSet.elements.

Doc from org.droidparts.dexmaker.dx.util.IntSet.elements.

Returns the count of unique elements in this set.

Returns:int

> = 0; count of unique elements

ensureCapacityback to summary
private void ensureCapacity(int value)

Ensures that the bit set has the capacity to represent the given value.

Parameters
value:int

>= 0; value to represent

hasback to summary
public boolean has(int value)

Implements org.droidparts.dexmaker.dx.util.IntSet.has.

Doc from org.droidparts.dexmaker.dx.util.IntSet.has.

Checks to see if a value is in the set

Parameters
value:int

int to check

Returns:boolean

true if in set

iteratorback to summary
public IntIterator iterator()

Implements org.droidparts.dexmaker.dx.util.IntSet.iterator.

Doc from org.droidparts.dexmaker.dx.util.IntSet.iterator.

Iterates the set

Returns:IntIterator

non-null; a set iterator

mergeback to summary
public void merge(IntSet other)

Implements org.droidparts.dexmaker.dx.util.IntSet.merge.

Doc from org.droidparts.dexmaker.dx.util.IntSet.merge.

Merges other into this set, so this set becomes the union of the two.

Parameters
other:IntSet

non-null; other set to merge with.

removeback to summary
public void remove(int value)

Implements org.droidparts.dexmaker.dx.util.IntSet.remove.

Doc from org.droidparts.dexmaker.dx.util.IntSet.remove.

Removes an int from a set.

Parameters
value:int

int to remove

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object