T - type of valuespublic class IntegerMapRBT<T> extends Object implements IntegerMap<T>
| Constructor and Description |
|---|
IntegerMapRBT(int nbBuckets)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear all elements of this map.
|
boolean |
containsKey(int key)
Return true if the map contains the given key.
|
T |
get(int key)
Get a value.
|
protected int |
hash(int key) |
boolean |
isEmpty()
Return true if this map is empty.
|
T |
put(int key,
T entry)
Put a value and return the previous value associated with this key, or null.
|
T |
remove(int key)
Remove a value.
|
int |
size()
Return the number of elements.
|
Iterator<T> |
values()
Iterates on values.
|
protected int hash(int key)
public T put(int key, T entry)
IntegerMapput in interface IntegerMap<T>public T get(int key)
IntegerMapget in interface IntegerMap<T>public T remove(int key)
IntegerMapremove in interface IntegerMap<T>public boolean containsKey(int key)
IntegerMapcontainsKey in interface IntegerMap<T>public int size()
PrimitiveMapsize in interface PrimitiveMap<T>public boolean isEmpty()
PrimitiveMapisEmpty in interface PrimitiveMap<T>public void clear()
PrimitiveMapclear in interface PrimitiveMap<T>public Iterator<T> values()
PrimitiveMapvalues in interface PrimitiveMap<T>Copyright © 2019. All rights reserved.