public class LongMap<V> extends Object implements Iterable<LongMap.Entry<V>>
| Modifier and Type | Class and Description |
|---|---|
static class |
LongMap.Entries<V> |
static class |
LongMap.Entry<V>
Returns an iterator for the keys in the map.
|
| Modifier and Type | Field and Description |
|---|---|
static org.robovm.objc.RandomXS128 |
random |
int |
size |
| Constructor and Description |
|---|
LongMap()
Creates a new map with an initial capacity of 32 and a load factor of 0.8.
|
LongMap(int initialCapacity)
Creates a new map with a load factor of 0.8.
|
LongMap(int initialCapacity,
float loadFactor)
Creates a new map with the specified initial capacity and load factor.
|
LongMap(LongMap<? extends V> 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(long key) |
boolean |
containsValue(Object value,
boolean identity)
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.
|
LongMap.Entries<V> |
entries()
Returns an iterator for the entries in the map.
|
long |
findKey(Object value,
boolean identity,
long notFound)
Returns the key for the specified value, or notFound if it is not in the map.
|
V |
get(long key) |
V |
get(long key,
V defaultValue) |
Iterator<LongMap.Entry<V>> |
iterator() |
static int |
nextPowerOfTwo(int value)
Returns the next power of two.
|
V |
put(long key,
V value) |
void |
putAll(LongMap<V> map) |
V |
remove(long key) |
void |
shrink(int maximumCapacity)
Reduces the size of the backing arrays to be the specified capacity or less.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic LongMap()
public LongMap(int initialCapacity)
public LongMap(int initialCapacity,
float loadFactor)
public static int nextPowerOfTwo(int value)
public V get(long key)
public V remove(long key)
public void shrink(int maximumCapacity)
public void clear(int maximumCapacity)
public void clear()
public boolean containsValue(Object value, boolean identity)
public boolean containsKey(long key)
public long findKey(Object value, boolean identity, long notFound)
identity - If true, uses == to compare the specified value with values in the map. If false, uses
Object.equals(Object).public void ensureCapacity(int additionalCapacity)
public Iterator<LongMap.Entry<V>> iterator()
iterator in interface Iterable<LongMap.Entry<V>>public LongMap.Entries<V> entries()
LongMap.Entries constructor for nested or multithreaded iteration.Copyright © 2012-2015 RoboVM AB. All Rights Reserved.