public class ConcurrentShortTreeMap<T> extends ShortTreeMap<T> implements ConcurrentCollection
ShortTreeMap.SortedKeys
ShortMap.Entries<V>, ShortMap.Entry<V>, ShortMap.Keys, ShortMap.Values<V>
Modifier and Type | Field and Description |
---|---|
protected ReadWriteLock |
lock |
Constructor and Description |
---|
ConcurrentShortTreeMap() |
ConcurrentShortTreeMap(int initialCapacity) |
ConcurrentShortTreeMap(int initialCapacity,
float loadFactor) |
ConcurrentShortTreeMap(ShortMap<? extends T> map)
NOTE: read access to the other map is not thread-safe
|
Modifier and Type | Method and Description |
---|---|
ShortMap.Keys |
ascendingKeys() |
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(short key) |
boolean |
containsValue(java.lang.Object value,
boolean identity)
Returns true if the specified value is in the map.
|
ShortMap.Keys |
descendingKeys() |
void |
ensureCapacity(int additionalCapacity)
Increases the size of the backing array to accommodate the specified number of additional items.
|
ShortMap.Entries<T> |
entries()
Returns an iterator for the entries in the map.
|
boolean |
equals(java.lang.Object object) |
short |
findKey(java.lang.Object value,
boolean identity,
short notFound)
Returns the key for the specified value, or notFound if it is not in the map.
|
T |
get(short key,
T defaultValue) |
ReadWriteLock |
getLock()
Returns the collection's
ReadWriteLock |
int |
hashCode() |
ShortMap.Keys |
keys()
Returns an iterator for the keys in the map.
|
T |
put(short key,
T value) |
void |
putAll(ShortMap<T> map) |
T |
remove(short key) |
void |
shrink(int maximumCapacity)
Reduces the size of the backing arrays to be the specified capacity or less.
|
java.lang.String |
toString() |
ShortMap.Values<T> |
values()
Returns an iterator for the values in the map.
|
protected ReadWriteLock lock
public ConcurrentShortTreeMap()
public ConcurrentShortTreeMap(int initialCapacity)
public ConcurrentShortTreeMap(int initialCapacity, float loadFactor)
public T put(short key, T value)
put
in class ShortTreeMap<T>
public void putAll(ShortMap<T> map)
putAll
in class ShortTreeMap<T>
public T remove(short key)
remove
in class ShortTreeMap<T>
public void shrink(int maximumCapacity)
ShortMap
public void clear(int maximumCapacity)
ShortMap
clear
in class ShortTreeMap<T>
public void clear()
clear
in class ShortTreeMap<T>
public boolean containsValue(java.lang.Object value, boolean identity)
ShortMap
containsValue
in class ShortMap<T>
public boolean containsKey(short key)
containsKey
in class ShortMap<T>
public short findKey(java.lang.Object value, boolean identity, short notFound)
ShortMap
findKey
in class ShortMap<T>
identity
- If true, uses == to compare the specified value with values in the map. If false, uses
ShortMap.equals(Object)
.public void ensureCapacity(int additionalCapacity)
ShortMap
ensureCapacity
in class ShortMap<T>
public ShortMap.Entries<T> entries()
ShortMap
ShortMap.Entries
constructor for nested or multithreaded iteration.public ShortMap.Values<T> values()
ShortMap
ShortMap.Entries
constructor for nested or multithreaded iteration.public ShortMap.Keys keys()
ShortMap
ShortMap.Entries
constructor for nested or multithreaded iteration.public ShortMap.Keys ascendingKeys()
ascendingKeys
in class ShortTreeMap<T>
public ShortMap.Keys descendingKeys()
descendingKeys
in class ShortTreeMap<T>
public ReadWriteLock getLock()
ConcurrentCollection
ReadWriteLock
getLock
in interface ConcurrentCollection
ReadWriteLock