public class ObjectFloatMap<K> extends java.lang.Object implements java.lang.Iterable<ObjectFloatMap.Entry<K>>
限定符和类型 | 类和说明 |
---|---|
static class |
ObjectFloatMap.Entries<K> |
static class |
ObjectFloatMap.Entry<K> |
static class |
ObjectFloatMap.Keys<K> |
static class |
ObjectFloatMap.Values |
限定符和类型 | 字段和说明 |
---|---|
int |
size |
构造器和说明 |
---|
ObjectFloatMap()
Creates a new map with an initial capacity of 51 and a load factor of 0.8.
|
ObjectFloatMap(int initialCapacity)
Creates a new map with a load factor of 0.8.
|
ObjectFloatMap(int initialCapacity,
float loadFactor)
Creates a new map with the specified initial capacity and load factor.
|
ObjectFloatMap(ObjectFloatMap<? extends K> map)
Creates a new map identical to the specified map.
|
限定符和类型 | 方法和说明 |
---|---|
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(K key) |
boolean |
containsValue(float value)
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.
|
ObjectFloatMap.Entries<K> |
entries()
Returns an iterator for the entries in the map.
|
boolean |
equals(java.lang.Object obj) |
K |
findKey(float value)
Returns the key for the specified value, or null if it is not in the map.
|
float |
get(K key,
float defaultValue) |
float |
getAndIncrement(K key,
float defaultValue,
float increment)
Returns the key's current value and increments the stored value.
|
int |
hashCode() |
ObjectFloatMap.Entries<K> |
iterator() |
ObjectFloatMap.Keys<K> |
keys()
Returns an iterator for the keys in the map.
|
void |
put(K key,
float value) |
void |
putAll(ObjectFloatMap<K> map) |
float |
remove(K key,
float defaultValue) |
void |
shrink(int maximumCapacity)
Reduces the size of the backing arrays to be the specified capacity or less.
|
java.lang.String |
toString() |
ObjectFloatMap.Values |
values()
Returns an iterator for the values in the map.
|
public ObjectFloatMap()
public ObjectFloatMap(int initialCapacity)
initialCapacity
- If not a power of two, it is increased to the next nearest power of two.public ObjectFloatMap(int initialCapacity, float loadFactor)
initialCapacity
- If not a power of two, it is increased to the next nearest power of two.public ObjectFloatMap(ObjectFloatMap<? extends K> map)
public void put(K key, float value)
public void putAll(ObjectFloatMap<K> map)
public float get(K key, float defaultValue)
defaultValue
- Returned if the key was not associated with a value.public float getAndIncrement(K key, float defaultValue, float increment)
public float remove(K key, float defaultValue)
public void shrink(int maximumCapacity)
public void clear(int maximumCapacity)
public void clear()
public boolean containsValue(float value)
public boolean containsKey(K key)
public K findKey(float value)
public void ensureCapacity(int additionalCapacity)
public int hashCode()
hashCode
在类中 java.lang.Object
public boolean equals(java.lang.Object obj)
equals
在类中 java.lang.Object
public java.lang.String toString()
toString
在类中 java.lang.Object
public ObjectFloatMap.Entries<K> iterator()
iterator
在接口中 java.lang.Iterable<ObjectFloatMap.Entry<K>>
public ObjectFloatMap.Entries<K> entries()
ObjectFloatMap.Entries
constructor for nested or multithreaded iteration.public ObjectFloatMap.Values values()
ObjectFloatMap.Entries
constructor for nested or multithreaded iteration.public ObjectFloatMap.Keys<K> keys()
ObjectFloatMap.Entries
constructor for nested or multithreaded iteration.