public class ListMap<K,V> extends AbstractMap<K,V>
| Constructor and Description |
|---|
ListMap() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsKey(K key)
Returns true if this map contains the specified key.
|
protected com.github.andrewoma.dexx.collection.internal.hashmap.ListMap.Node<K,V> |
createNode(K key,
V value) |
static <K,V> ListMap<K,V> |
empty() |
static <K,V> BuilderFactory<Pair<K,V>,ListMap<K,V>> |
factory() |
<U> void |
forEach(Function<Pair<K,V>,U> f)
All collection methods can be built upon this
forEach definition. |
V |
get(K key)
Returns the value associated with the key or
null if the no value exists with the key specified. |
protected K |
getKey() |
protected V |
getValue() |
boolean |
isEmpty()
Returns true if this collection is empty.
|
java.util.Iterator<Pair<K,V>> |
iterator() |
ListMap<K,V> |
put(K key,
V value)
Returns a map with the value specified associated to the key specified.
|
ListMap<K,V> |
remove(K key)
Returns a map with the value associated with the key removed if it exists.
|
int |
size()
Returns the size of the collection.
|
ListMap<K,V> |
tail() |
asMap, equals, hashCode, keys, valuesmakeString, makeString, to, toArray, toArray, toIndexedList, toSet, toSortedSet, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitmakeString, makeString, to, toArray, toArray, toIndexedList, toSet, toSortedSet@NotNull public static <K,V> BuilderFactory<Pair<K,V>,ListMap<K,V>> factory()
@NotNull public static <K,V> ListMap<K,V> empty()
public int size()
TraversableWarning: infinite collections are possible, as are collections that require traversal to calculate the size.
size in interface Traversable<Pair<K,V>>size in class AbstractTraversable<Pair<K,V>>public V get(@NotNull K key)
Mapnull if the no value exists with the key specified.@NotNull public ListMap<K,V> put(@NotNull K key, V value)
MapIf value already exists for the key, it will be replaced.
@NotNull public ListMap<K,V> remove(@NotNull K key)
Mappublic <U> void forEach(@NotNull
Function<Pair<K,V>,U> f)
TraversableforEach definition.forEach in interface Traversable<Pair<K,V>>forEach in class AbstractIterable<Pair<K,V>>protected K getKey()
protected V getValue()
public boolean isEmpty()
TraversableisEmpty in interface Traversable<Pair<K,V>>isEmpty in class AbstractTraversable<Pair<K,V>>protected com.github.andrewoma.dexx.collection.internal.hashmap.ListMap.Node<K,V> createNode(K key, V value)