|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.emory.mathcs.util.collections.ints.AbstractIntCollection
edu.emory.mathcs.util.collections.ints.AbstractIntSet
edu.emory.mathcs.util.collections.ints.IntRadkeHashSet
Hash set of int numbers. It uses open addressing with quadratic residue search to avoid clustering. No additional memory per entry is needed, there is therefore no memory allocation on add() unless rehashing is required.
| Constructor Summary | |
IntRadkeHashSet()
|
|
IntRadkeHashSet(int minInitialCapacity)
|
|
IntRadkeHashSet(IntCollection c)
|
|
IntRadkeHashSet(int minInitialCapacity,
float loadFactor,
float resizeTreshold)
|
|
IntRadkeHashSet(int minInitialCapacity,
int min,
int max)
|
|
IntRadkeHashSet(int minInitialCapacity,
int min,
int max,
float loadFactor,
float resizeTreshold)
|
|
IntRadkeHashSet(IntSet m)
|
|
| Method Summary | |
boolean |
add(int elem)
Adds the specified number to this set if it is not already present and if it falls within the domain. |
void |
clear()
Removes all of the elements from this set. |
java.lang.Object |
clone()
|
boolean |
contains(int elem)
Returns true if this set contains the specified number; false otherwise. |
boolean |
equals(java.lang.Object other)
Two sets are equal if they consists of the same elements. |
int |
hashCode()
|
boolean |
isEmpty()
Returns true if this set is empty; false otherwise. |
IntIterator |
iterator()
Returns the iterator over numbers contained in this set. |
int |
max()
The largest number that can be stored in this set. |
int |
min()
The smallest number that can be stored in this set. |
boolean |
remove(int elem)
Removes the specified number from this set if it is present. |
boolean |
removeAll(IntCollection c)
Removes from this set all of its elements that are contained in the specified collection. |
boolean |
retainAll(IntCollection c)
Retains only the elements in this set that are contained in the specified collection. |
int |
size()
Returns the number of elements in this set. |
int |
size64()
Returns the number of elements in this set. |
int[] |
toArray()
Returns the newly allocated array containing all numbers from this set, in the order returned by its iterator. |
int[] |
toArray(int[] a)
Returns an array containing all of the numbers in this set. |
| Methods inherited from class edu.emory.mathcs.util.collections.ints.AbstractIntSet |
addAll, addInterval, complementSet, containsInterval, removeInterval, retainInterval |
| Methods inherited from class edu.emory.mathcs.util.collections.ints.AbstractIntCollection |
containsAll, toString |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface edu.emory.mathcs.util.collections.ints.IntSet |
containsAll |
| Constructor Detail |
public IntRadkeHashSet()
public IntRadkeHashSet(int minInitialCapacity)
public IntRadkeHashSet(int minInitialCapacity,
int min,
int max)
public IntRadkeHashSet(int minInitialCapacity,
float loadFactor,
float resizeTreshold)
public IntRadkeHashSet(int minInitialCapacity,
int min,
int max,
float loadFactor,
float resizeTreshold)
public IntRadkeHashSet(IntSet m)
public IntRadkeHashSet(IntCollection c)
| Method Detail |
public int min()
IntSet
min in interface IntSetmin in class AbstractIntSetpublic int max()
IntSet
max in interface IntSetmax in class AbstractIntSetpublic boolean add(int elem)
IntSet
add in interface IntSetadd in class AbstractIntCollectionpublic boolean contains(int elem)
IntSet
contains in interface IntSetcontains in class AbstractIntCollectionpublic boolean remove(int elem)
IntSet
remove in interface IntSetremove in class AbstractIntCollectionpublic void clear()
IntSet
clear in interface IntSetclear in class AbstractIntCollectionpublic boolean isEmpty()
IntSet
isEmpty in interface IntSetisEmpty in class AbstractIntSetpublic int size64()
IntSet
size64 in interface IntSetsize64 in class AbstractIntCollectionpublic int size()
IntSet
size in interface IntSetsize in class AbstractIntCollectionpublic IntIterator iterator()
IntSet
iterator in interface IntSetiterator in class AbstractIntCollectionpublic boolean equals(java.lang.Object other)
IntSet
equals in interface IntSetequals in class AbstractIntSetpublic int hashCode()
hashCode in interface IntSethashCode in class AbstractIntSetpublic java.lang.Object clone()
public boolean removeAll(IntCollection c)
IntSet
removeAll in interface IntSetremoveAll in class AbstractIntSetpublic boolean retainAll(IntCollection c)
IntSet
retainAll in interface IntSetretainAll in class AbstractIntSetpublic int[] toArray(int[] a)
IntSetIf this set makes any guarantees as to what order its elements are returned by its iterator, this method must return the elements in the same order.
Like the IntSet.toArray() method, this method acts as bridge between
array-based and collection-based APIs. Further, this method may,
under certain circumstances, be used to save allocation costs.
toArray in interface IntSettoArray in class AbstractIntCollectionpublic int[] toArray()
IntSet
toArray in interface IntSettoArray in class AbstractIntCollection
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||