|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mahout.math.PersistentObject
org.apache.mahout.math.set.AbstractSet
org.apache.mahout.math.set.AbstractLongSet
public abstract class AbstractLongSet
Field Summary |
---|
Fields inherited from class org.apache.mahout.math.set.AbstractSet |
---|
DEFAULT_CAPACITY, DEFAULT_MAX_LOAD_FACTOR, DEFAULT_MIN_LOAD_FACTOR, distinct, highWaterMark, lowWaterMark, maxLoadFactor, minLoadFactor |
Constructor Summary | |
---|---|
AbstractLongSet()
|
Method Summary | |
---|---|
abstract boolean |
add(long key)
Associates the given key with the given value. |
boolean |
contains(long key)
Returns true if the receiver contains the specified key. |
AbstractLongSet |
copy()
Returns a deep copy of the receiver; uses clone() and casts the result. |
boolean |
equals(Object obj)
|
abstract boolean |
forEachKey(LongProcedure procedure)
Applies a procedure to each key of the receiver, if any. |
int |
hashCode()
|
LongArrayList |
keys()
Returns a list filled with all keys contained in the receiver. |
void |
keys(LongArrayList list)
Fills all keys contained in the receiver into the specified list. |
abstract boolean |
remove(long key)
Removes the given key with its associated element from the receiver, if present. |
String |
toString()
Returns a string representation of the receiver, containing the String representation of each key-value pair, sorted ascending by key. |
Methods inherited from class org.apache.mahout.math.set.AbstractSet |
---|
chooseGrowCapacity, chooseHighWaterMark, chooseLowWaterMark, chooseMeanCapacity, chooseShrinkCapacity, clear, ensureCapacity, equalsMindTheNull, isEmpty, nextPrime, setUp, size, trimToSize |
Methods inherited from class org.apache.mahout.math.PersistentObject |
---|
clone |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AbstractLongSet()
Method Detail |
---|
public boolean contains(long key)
public AbstractLongSet copy()
clone()
and casts the result.
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public abstract boolean forEachKey(LongProcedure procedure)
procedure
- the procedure to be applied. Stops iteration if the procedure returns false, otherwise
continues.
public LongArrayList keys()
forEachKey(LongProcedure)
. This method can be used to iterate over the keys of the receiver.
public void keys(LongArrayList list)
forEachKey(LongProcedure)
.
This method can be used to iterate over the keys of the receiver.
list
- the list to be filled, can have any size.public abstract boolean add(long key)
key
- the key the value shall be associated with.
public abstract boolean remove(long key)
key
- the key to be removed from the receiver.
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |