|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.github.andrewoma.dexx.collection.internal.base.AbstractTraversable<E>
com.github.andrewoma.dexx.collection.internal.base.AbstractIterable<Pair<K,V>>
com.github.andrewoma.dexx.collection.internal.base.AbstractMap<K,V>
com.github.andrewoma.dexx.collection.internal.hashmap.ListMap<K,V>
public class ListMap<K,V>
| Constructor Summary | |
|---|---|
ListMap()
|
|
| Method Summary | ||
|---|---|---|
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
|
empty()
|
|
static
|
factory()
|
|
|
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. |
|
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()
|
|
| Methods inherited from class com.github.andrewoma.dexx.collection.internal.base.AbstractMap |
|---|
asMap, equals, hashCode, keys, values |
| Methods inherited from class com.github.andrewoma.dexx.collection.internal.base.AbstractTraversable |
|---|
makeString, makeString, to, toArray, toArray, toIndexedList, toSet, toSortedSet, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.github.andrewoma.dexx.collection.Traversable |
|---|
makeString, makeString, to, toArray, toArray, toIndexedList, toSet, toSortedSet |
| Constructor Detail |
|---|
public ListMap()
| Method Detail |
|---|
@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)
Map
public <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>>@NotNull public Iterator<Pair<K,V>> iterator()
protected K getKey()
protected V getValue()
public ListMap<K,V> tail()
public boolean isEmpty()
Traversable
isEmpty 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)
public boolean containsKey(@NotNull
K key)
Map
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||