Class ArraySingleValueMapNode<K,V>
java.lang.Object
org.javimmutable.collections.hash.map.ArraySingleValueMapNode<K,V>
- All Implemented Interfaces:
ArrayMapNode<K,
,V> IMapEntry<K,
V>
@Immutable
public class ArraySingleValueMapNode<K,V>
extends Object
implements ArrayMapNode<K,V>, IMapEntry<K,V>
-
Constructor Summary
ConstructorDescriptionArraySingleValueMapNode
(K key, V value) ArraySingleValueMapNode
(IMapEntry<K, V> entry) -
Method Summary
Modifier and TypeMethodDescriptiondelete
(CollisionMap<K, V> collisionMap, K key) entries
(CollisionMap<K, V> collisionMap) boolean
find
(CollisionMap<K, V> collisionMap, K key) findEntry
(CollisionMap<K, V> collisionMap, K key) void
<E extends Exception>
voidforEachThrows
(CollisionMap<K, V> collisionMap, Proc2Throws<K, V, E> proc) getKey()
getValue()
getValueOr
(CollisionMap<K, V> collisionMap, K key, V defaultValue) int
hashCode()
keys
(CollisionMap<K, V> collisionMap) int
size
(CollisionMap<K, V> collisionMap) values
(CollisionMap<K, V> collisionMap)
-
Constructor Details
-
ArraySingleValueMapNode
-
ArraySingleValueMapNode
-
-
Method Details
-
size
- Specified by:
size
in interfaceArrayMapNode<K,
V>
-
getValueOr
- Specified by:
getValueOr
in interfaceArrayMapNode<K,
V>
-
find
- Specified by:
find
in interfaceArrayMapNode<K,
V>
-
findEntry
@Nonnull public Maybe<IMapEntry<K,V>> findEntry(@Nonnull CollisionMap<K, V> collisionMap, @Nonnull K key) - Specified by:
findEntry
in interfaceArrayMapNode<K,
V>
-
assign
@Nonnull public ArrayMapNode<K,V> assign(@Nonnull CollisionMap<K, V> collisionMap, @Nonnull K key, V value) - Specified by:
assign
in interfaceArrayMapNode<K,
V>
-
update
@Nonnull public ArrayMapNode<K,V> update(@Nonnull CollisionMap<K, V> collisionMap, @Nonnull K key, @Nonnull Func1<Maybe<V>, V> generator) - Specified by:
update
in interfaceArrayMapNode<K,
V>
-
delete
- Specified by:
delete
in interfaceArrayMapNode<K,
V>
-
keys
- Specified by:
keys
in interfaceArrayMapNode<K,
V>
-
values
- Specified by:
values
in interfaceArrayMapNode<K,
V>
-
entries
@Nonnull public GenericIterator.Iterable<IMapEntry<K,V>> entries(@Nonnull CollisionMap<K, V> collisionMap) - Specified by:
entries
in interfaceArrayMapNode<K,
V>
-
forEach
- Specified by:
forEach
in interfaceArrayMapNode<K,
V>
-
forEachThrows
public <E extends Exception> void forEachThrows(@Nonnull CollisionMap<K, V> collisionMap, @Nonnull Proc2Throws<K, throws EV, E> proc) - Specified by:
forEachThrows
in interfaceArrayMapNode<K,
V> - Throws:
E
-
getValue
-
getKey
-
equals
-
hashCode
public int hashCode()
-