|
||||||||||
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 IntSet
min
in class AbstractIntSet
public int max()
IntSet
max
in interface IntSet
max
in class AbstractIntSet
public boolean add(int elem)
IntSet
add
in interface IntSet
add
in class AbstractIntCollection
public boolean contains(int elem)
IntSet
contains
in interface IntSet
contains
in class AbstractIntCollection
public boolean remove(int elem)
IntSet
remove
in interface IntSet
remove
in class AbstractIntCollection
public void clear()
IntSet
clear
in interface IntSet
clear
in class AbstractIntCollection
public boolean isEmpty()
IntSet
isEmpty
in interface IntSet
isEmpty
in class AbstractIntSet
public int size64()
IntSet
size64
in interface IntSet
size64
in class AbstractIntCollection
public int size()
IntSet
size
in interface IntSet
size
in class AbstractIntCollection
public IntIterator iterator()
IntSet
iterator
in interface IntSet
iterator
in class AbstractIntCollection
public boolean equals(java.lang.Object other)
IntSet
equals
in interface IntSet
equals
in class AbstractIntSet
public int hashCode()
hashCode
in interface IntSet
hashCode
in class AbstractIntSet
public java.lang.Object clone()
public boolean removeAll(IntCollection c)
IntSet
removeAll
in interface IntSet
removeAll
in class AbstractIntSet
public boolean retainAll(IntCollection c)
IntSet
retainAll
in interface IntSet
retainAll
in class AbstractIntSet
public int[] toArray(int[] a)
IntSet
If 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 IntSet
toArray
in class AbstractIntCollection
public int[] toArray()
IntSet
toArray
in interface IntSet
toArray
in class AbstractIntCollection
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |