|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.emory.mathcs.util.collections.longs.AbstractLongCollection
edu.emory.mathcs.util.collections.longs.AbstractLongSet
edu.emory.mathcs.util.collections.longs.LongRadkeHashSet
Hash set of long 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 | |
LongRadkeHashSet()
|
|
LongRadkeHashSet(int minInitialCapacity)
|
|
LongRadkeHashSet(int minInitialCapacity,
float loadFactor,
float resizeTreshold)
|
|
LongRadkeHashSet(int minInitialCapacity,
long min,
long max)
|
|
LongRadkeHashSet(int minInitialCapacity,
long min,
long max,
float loadFactor,
float resizeTreshold)
|
|
LongRadkeHashSet(LongCollection c)
|
|
LongRadkeHashSet(LongSet m)
|
|
| Method Summary | |
boolean |
add(long 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(long 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. |
LongIterator |
iterator()
Returns the iterator over numbers contained in this set. |
long |
max()
The largest number that can be stored in this set. |
long |
min()
The smallest number that can be stored in this set. |
boolean |
remove(long elem)
Removes the specified number from this set if it is present. |
boolean |
removeAll(LongCollection c)
Removes from this set all of its elements that are contained in the specified collection. |
boolean |
retainAll(LongCollection 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. |
long |
size64()
// PREPROC: Long,Int only Returns the number of elements in this set. |
long[] |
toArray()
Returns the newly allocated array containing all numbers from this set, in the order returned by its iterator. |
long[] |
toArray(long[] a)
Returns an array containing all of the numbers in this set. |
| Methods inherited from class edu.emory.mathcs.util.collections.longs.AbstractLongSet |
addAll, addInterval, complementSet, containsInterval, removeInterval, retainInterval |
| Methods inherited from class edu.emory.mathcs.util.collections.longs.AbstractLongCollection |
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.longs.LongSet |
containsAll |
| Constructor Detail |
public LongRadkeHashSet()
public LongRadkeHashSet(int minInitialCapacity)
public LongRadkeHashSet(int minInitialCapacity,
long min,
long max)
public LongRadkeHashSet(int minInitialCapacity,
float loadFactor,
float resizeTreshold)
public LongRadkeHashSet(int minInitialCapacity,
long min,
long max,
float loadFactor,
float resizeTreshold)
public LongRadkeHashSet(LongSet m)
public LongRadkeHashSet(LongCollection c)
| Method Detail |
public long min()
LongSet
min in interface LongSetmin in class AbstractLongSetpublic long max()
LongSet
max in interface LongSetmax in class AbstractLongSetpublic boolean add(long elem)
LongSet
add in interface LongSetadd in class AbstractLongCollectionpublic boolean contains(long elem)
LongSet
contains in interface LongSetcontains in class AbstractLongCollectionpublic boolean remove(long elem)
LongSet
remove in interface LongSetremove in class AbstractLongCollectionpublic void clear()
LongSet
clear in interface LongSetclear in class AbstractLongCollectionpublic boolean isEmpty()
LongSet
isEmpty in interface LongSetisEmpty in class AbstractLongSetpublic long size64()
LongSet
size64 in interface LongSetsize64 in class AbstractLongCollectionpublic int size()
LongSet
size in interface LongSetsize in class AbstractLongCollectionpublic LongIterator iterator()
LongSet
iterator in interface LongSetiterator in class AbstractLongCollectionpublic boolean equals(java.lang.Object other)
LongSet
equals in interface LongSetequals in class AbstractLongSetpublic int hashCode()
hashCode in interface LongSethashCode in class AbstractLongSetpublic java.lang.Object clone()
public boolean removeAll(LongCollection c)
LongSet
removeAll in interface LongSetremoveAll in class AbstractLongSetpublic boolean retainAll(LongCollection c)
LongSet
retainAll in interface LongSetretainAll in class AbstractLongSetpublic long[] toArray(long[] a)
LongSetIf 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 LongSet.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 LongSettoArray in class AbstractLongCollectionpublic long[] toArray()
LongSet
toArray in interface LongSettoArray in class AbstractLongCollection
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||