Class ListMap.Node<K,V>
- java.lang.Object
-
- com.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>
-
- com.github.andrewoma.dexx.collection.internal.hashmap.ListMap.Node<K,V>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.github.andrewoma.dexx.collection.internal.hashmap.ListMap
ListMap.Node<K,V>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private ListMap<K,V>apply0(ListMap<K,V> cur, K key)booleancontainsKey(K key)Returns true if this map contains the specified key.Vget(K key)Returns the value associated with the key ornullif the no value exists with the key specified.protected KgetKey()protected VgetValue()booleanisEmpty()Returns true if this collection is empty.@NotNull ListMap<K,V>put(K key, V value)Returns a map with the value specified associated to the key specified.@NotNull ListMap<K,V>remove(K key)Returns a map with the value associated with the key removed if it exists.intsize()Returns the size of the collection.private intsize0(ListMap<K,V> cur, int acc)ListMap<K,V>tail()-
Methods inherited from class com.github.andrewoma.dexx.collection.internal.hashmap.ListMap
createNode, empty, factory, forEach, iterator
-
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
-
-
-
-
Method Detail
-
size
public int size()
Description copied from interface:TraversableReturns the size of the collection.Warning: infinite collections are possible, as are collections that require traversal to calculate the size.
-
isEmpty
public boolean isEmpty()
Description copied from interface:TraversableReturns true if this collection is empty.
-
get
public V get(@NotNull K key)
Description copied from interface:MapReturns the value associated with the key ornullif the no value exists with the key specified.
-
put
@NotNull public @NotNull ListMap<K,V> put(@NotNull K key, V value)
Description copied from interface:MapReturns a map with the value specified associated to the key specified.If value already exists for the key, it will be replaced.
-
remove
@NotNull public @NotNull ListMap<K,V> remove(@NotNull K key)
Description copied from interface:MapReturns a map with the value associated with the key removed if it exists.
-
containsKey
public boolean containsKey(@NotNull K key)Description copied from interface:MapReturns true if this map contains the specified key.- Specified by:
containsKeyin interfaceMap<K,V>- Overrides:
containsKeyin classListMap<K,V>
-
-