public class ConcurrentIntFloatMap extends org.mini2Dx.gdx.utils.IntFloatMap implements ConcurrentCollection
Modifier and Type | Field and Description |
---|---|
protected ReadWriteLock |
lock |
Constructor and Description |
---|
ConcurrentIntFloatMap()
Creates a new map with an initial capacity of 51 and a load factor of 0.8.
|
ConcurrentIntFloatMap(int initialCapacity)
Creates a new map with a load factor of 0.8.
|
ConcurrentIntFloatMap(int initialCapacity,
float loadFactor)
Creates a new map with the specified initial capacity and load factor.
|
ConcurrentIntFloatMap(org.mini2Dx.gdx.utils.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.
|
org.mini2Dx.gdx.utils.IntFloatMap.Entries |
entries()
Returns an iterator for the entries in the map.
|
boolean |
equals(java.lang.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.
|
ReadWriteLock |
getLock()
Returns the collection's
ReadWriteLock |
int |
hashCode() |
boolean |
isEmpty()
Returns true if the map is empty.
|
org.mini2Dx.gdx.utils.IntFloatMap.Keys |
keys()
Returns an iterator for the keys in the map.
|
boolean |
notEmpty()
Returns true if the map has one or more items.
|
void |
put(int key,
float value) |
void |
putAll(org.mini2Dx.gdx.utils.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.
|
java.lang.String |
toString() |
org.mini2Dx.gdx.utils.IntFloatMap.Values |
values()
Returns an iterator for the values in the map.
|
protected ReadWriteLock lock
public ConcurrentIntFloatMap()
public ConcurrentIntFloatMap(int initialCapacity)
initialCapacity
- If not a power of two, it is increased to the next nearest power of two.public ConcurrentIntFloatMap(int initialCapacity, float loadFactor)
initialCapacity
- If not a power of two, it is increased to the next nearest power of two.loadFactor
- public ConcurrentIntFloatMap(org.mini2Dx.gdx.utils.IntFloatMap map)
map
- public void put(int key, float value)
put
in class org.mini2Dx.gdx.utils.IntFloatMap
public void putAll(org.mini2Dx.gdx.utils.IntFloatMap map)
putAll
in class org.mini2Dx.gdx.utils.IntFloatMap
public float get(int key, float defaultValue)
get
in class org.mini2Dx.gdx.utils.IntFloatMap
key
- defaultValue
- Returned if the key was not associated with a value.public float getAndIncrement(int key, float defaultValue, float increment)
getAndIncrement
in class org.mini2Dx.gdx.utils.IntFloatMap
key
- defaultValue
- increment
- public float remove(int key, float defaultValue)
remove
in class org.mini2Dx.gdx.utils.IntFloatMap
public boolean notEmpty()
notEmpty
in class org.mini2Dx.gdx.utils.IntFloatMap
public boolean isEmpty()
isEmpty
in class org.mini2Dx.gdx.utils.IntFloatMap
public void shrink(int maximumCapacity)
shrink
in class org.mini2Dx.gdx.utils.IntFloatMap
maximumCapacity
- public void clear(int maximumCapacity)
clear
in class org.mini2Dx.gdx.utils.IntFloatMap
maximumCapacity
- public void clear()
clear
in class org.mini2Dx.gdx.utils.IntFloatMap
public boolean containsValue(float value)
containsValue
in class org.mini2Dx.gdx.utils.IntFloatMap
value
- public boolean containsValue(float value, float epsilon)
containsValue
in class org.mini2Dx.gdx.utils.IntFloatMap
value
- epsilon
- public boolean containsKey(int key)
containsKey
in class org.mini2Dx.gdx.utils.IntFloatMap
public int findKey(float value, int notFound)
findKey
in class org.mini2Dx.gdx.utils.IntFloatMap
value
- notFound
- public void ensureCapacity(int additionalCapacity)
ensureCapacity
in class org.mini2Dx.gdx.utils.IntFloatMap
additionalCapacity
- public int hashCode()
hashCode
in class org.mini2Dx.gdx.utils.IntFloatMap
public boolean equals(java.lang.Object obj)
equals
in class org.mini2Dx.gdx.utils.IntFloatMap
public java.lang.String toString()
toString
in class org.mini2Dx.gdx.utils.IntFloatMap
public org.mini2Dx.gdx.utils.IntFloatMap.Entries entries()
If Collections.allocateIterators
is false, the same iterator instance is returned each time this method is called. Use the
Entries
constructor for nested or multithreaded iteration.
entries
in class org.mini2Dx.gdx.utils.IntFloatMap
public org.mini2Dx.gdx.utils.IntFloatMap.Values values()
If Collections.allocateIterators
is false, the same iterator instance is returned each time this method is called. Use the
Entries
constructor for nested or multithreaded iteration.
values
in class org.mini2Dx.gdx.utils.IntFloatMap
public org.mini2Dx.gdx.utils.IntFloatMap.Keys keys()
If Collections.allocateIterators
is false, the same iterator instance is returned each time this method is called. Use the
Entries
constructor for nested or multithreaded iteration.
keys
in class org.mini2Dx.gdx.utils.IntFloatMap
public ReadWriteLock getLock()
ConcurrentCollection
ReadWriteLock
getLock
in interface ConcurrentCollection
ReadWriteLock