public abstract class AbstractMap extends PersistentObject
int
, float
, etc. as keys and/or values.
First see the package summary and javadoc
tree view to get the broad picture.
Note that implementations are not synchronized.
HashMap
,
Serialized FormModifier and Type | Method and Description |
---|---|
abstract void |
clear()
Removes all (key,value) associations from the receiver.
|
void |
ensureCapacity(int minCapacity)
Ensures that the receiver can hold at least the specified number of
elements without needing to allocate new internal memory.
|
boolean |
isEmpty()
Returns true if the receiver contains no (key,value)
associations.
|
int |
size()
Returns the number of (key,value) associations currently contained.
|
void |
trimToSize()
Trims the capacity of the receiver to be the receiver's current size.
|
clone
public abstract void clear()
public void ensureCapacity(int minCapacity)
This method never need be called; it is for performance tuning only. Calling this method before put()ing a large number of associations boosts performance, because the receiver will grow only once instead of potentially many times.
This default implementation does nothing. Override this method if necessary.
minCapacity
- the desired minimum capacity.public boolean isEmpty()
public int size()
public void trimToSize()
This default implementation does nothing. Override this method if necessary.
Jump to the Parallel Colt Homepage