public class IntFloatMap extends Object implements Iterable<IntFloatMap.Entry>
Modifier and Type | Class and Description |
---|---|
static class |
IntFloatMap.Entries |
static class |
IntFloatMap.Entry |
static class |
IntFloatMap.Keys |
static class |
IntFloatMap.Values |
Modifier and Type | Field and Description |
---|---|
int |
size |
Constructor and Description |
---|
IntFloatMap()
Creates a new map with an initial capacity of 32 and a load factor of 0.8.
|
IntFloatMap(int initialCapacity)
Creates a new map with a load factor of 0.8.
|
IntFloatMap(int initialCapacity,
float loadFactor)
Creates a new map with the specified initial capacity and load factor.
|
IntFloatMap(IntFloatMap map)
Creates a new map identical to the specified map.
|
Modifier and Type | Method and Description |
---|---|
void |
clear() |
void |
clear(int maximumCapacity)
Clears the map and reduces the size of the backing arrays to be the specified capacity if they are larger.
|
boolean |
containsKey(int key) |
boolean |
containsValue(float value)
Returns true if the specified value is in the map.
|
boolean |
containsValue(float value,
float epsilon)
Returns true if the specified value is in the map.
|
void |
ensureCapacity(int additionalCapacity)
Increases the size of the backing array to accommodate the specified number of additional items.
|
IntFloatMap.Entries |
entries()
Returns an iterator for the entries in the map.
|
boolean |
equals(Object obj) |
int |
findKey(float value,
int notFound)
Returns the key for the specified value, or null if it is not in the map.
|
float |
get(int key,
float defaultValue) |
float |
getAndIncrement(int key,
float defaultValue,
float increment)
Returns the key's current value and increments the stored value.
|
int |
hashCode() |
Iterator<IntFloatMap.Entry> |
iterator() |
IntFloatMap.Keys |
keys()
Returns an iterator for the keys in the map.
|
void |
put(int key,
float value) |
void |
putAll(IntFloatMap map) |
float |
remove(int key,
float defaultValue) |
void |
shrink(int maximumCapacity)
Reduces the size of the backing arrays to be the specified capacity or less.
|
String |
toString() |
IntFloatMap.Values |
values()
Returns an iterator for the values in the map.
|
forEach, spliterator
public IntFloatMap()
public IntFloatMap(int initialCapacity)
public IntFloatMap(int initialCapacity, float loadFactor)
public IntFloatMap(IntFloatMap map)
public void put(int key, float value)
public void putAll(IntFloatMap map)
public float get(int key, float defaultValue)
defaultValue
- Returned if the key was not associated with a value.public float getAndIncrement(int key, float defaultValue, float increment)
public float remove(int key, float defaultValue)
public void shrink(int maximumCapacity)
public void clear(int maximumCapacity)
public void clear()
public boolean containsValue(float value)
public boolean containsValue(float value, float epsilon)
public boolean containsKey(int key)
public int findKey(float value, int notFound)
public void ensureCapacity(int additionalCapacity)
public Iterator<IntFloatMap.Entry> iterator()
iterator
in interface Iterable<IntFloatMap.Entry>
public IntFloatMap.Entries entries()
IntFloatMap.Entries
constructor for nested or multithreaded iteration.public IntFloatMap.Values values()
IntFloatMap.Entries
constructor for nested or multithreaded iteration.public IntFloatMap.Keys keys()
IntFloatMap.Entries
constructor for nested or multithreaded iteration.Copyright © 2015. All rights reserved.