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