|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.intermine.util.IntPresentSet
public class IntPresentSet
This is a set of ints. This class provides methods to insert an int, check for the presence of a given int, and remove an int from the set. This class is designed to use as little RAM as possible, and assumes that the ints are reasonably closely-spaced. In the case where the ints are consecutive, this class will use not much more than an eighth of a byte per mapping.
| Constructor Summary | |
|---|---|
IntPresentSet()
Constructor for this class. |
|
| Method Summary | |
|---|---|
void |
add(java.lang.Integer i)
Adds an int to the set. |
void |
clear()
Removes all ints from the object. |
boolean |
contains(int i)
Returns whether the given int is present in this set. |
boolean |
contains(java.lang.Integer i)
Returns whether the given Integer is present in this set. |
void |
set(int i,
boolean newBit)
Adds the given int to the set. |
int |
size()
Returns the number of ints present. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public IntPresentSet()
| Method Detail |
|---|
public void set(int i,
boolean newBit)
i - the int to add to the setnewBit - true to add to the set, false to remove from the setpublic boolean contains(int i)
i - any int
public void add(java.lang.Integer i)
i - an Integerpublic boolean contains(java.lang.Integer i)
i - any Integer
public int size()
public void clear()
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||