public abstract class AbstractShortSet extends AbstractSet
DEFAULT_CAPACITY, DEFAULT_MAX_LOAD_FACTOR, DEFAULT_MIN_LOAD_FACTOR, distinct, highWaterMark, lowWaterMark, maxLoadFactor, minLoadFactor| Constructor and Description |
|---|
AbstractShortSet() |
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
add(short key)
Associates the given key with the given value.
|
boolean |
contains(short key)
Returns true if the receiver contains the specified key.
|
AbstractShortSet |
copy()
Returns a deep copy of the receiver; uses
clone() and casts the result. |
boolean |
equals(Object obj) |
abstract boolean |
forEachKey(ShortProcedure procedure)
Applies a procedure to each key of the receiver, if any.
|
int |
hashCode() |
ShortArrayList |
keys()
Returns a list filled with all keys contained in the receiver.
|
void |
keys(ShortArrayList list)
Fills all keys contained in the receiver into the specified list.
|
abstract boolean |
remove(short 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.
|
chooseGrowCapacity, chooseHighWaterMark, chooseLowWaterMark, chooseMeanCapacity, chooseShrinkCapacity, clear, ensureCapacity, equalsMindTheNull, isEmpty, nextPrime, setUp, size, trimToSizeclonepublic boolean contains(short key)
public AbstractShortSet copy()
clone() and casts the result.public abstract boolean forEachKey(ShortProcedure procedure)
procedure - the procedure to be applied. Stops iteration if the procedure returns false, otherwise
continues.public ShortArrayList keys()
forEachKey(ShortProcedure). This method can be used to iterate over the keys of the receiver.
public void keys(ShortArrayList list)
forEachKey(ShortProcedure).
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(short key)
key - the key the value shall be associated with.public abstract boolean remove(short key)
key - the key to be removed from the receiver.Copyright © 2008–2016 The Apache Software Foundation. All rights reserved.