Class MutableHashedLinkedMap<K,V> 
- Type Parameters:
- K- the type of keys
- V- the type of mapped values
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionprivate static classprivate classprivate static classstatic interface
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final it.unimi.dsi.fastutil.Hash.Strategy<? super Object>A strategy that usesObjects.hashCode(Object)andObject.equals(Object).private intprivate MutableHashedLinkedMap<K,V>.Entry static final it.unimi.dsi.fastutil.Hash.Strategy<? super Object>A strategy that usesSystem.identityHashCode(Object)anda == bcomparisons.private MutableHashedLinkedMap<K,V>.Entry private final MutableHashedLinkedMap.MergeFunction<K,V> private final it.unimi.dsi.fastutil.Hash.Strategy<? super K>
- 
Constructor SummaryConstructorsConstructorDescriptionCreates a new instance using theBASICstrategy.MutableHashedLinkedMap(it.unimi.dsi.fastutil.Hash.Strategy<? super K> strategy) Creates a mutable linked map with a default new-value-selecting merge function.MutableHashedLinkedMap(it.unimi.dsi.fastutil.Hash.Strategy<? super K> strategy, MutableHashedLinkedMap.MergeFunction<K, V> merge) Creates a mutable linked map with a custom merge function.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanbooleanisEmpty()iterator()Inserts the mapping with the specified key and value pair.Inserts the mapping with this key and value pair immediately after the entry with the specified positioning key.Inserts the mapping with this key and value pair immediately before the entry with the specified positioning key.Inserts the mapping with the specified key and value pair at the beginning of this map.private voidMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.IterableforEach, spliterator
- 
Field Details- 
BASICA strategy that usesObjects.hashCode(Object)andObject.equals(Object).
- 
IDENTITYA strategy that usesSystem.identityHashCode(Object)anda == bcomparisons.
- 
strategy
- 
entries
- 
merge
- 
head
- 
last
- 
changesprivate transient int changes
 
- 
- 
Constructor Details- 
MutableHashedLinkedMappublic MutableHashedLinkedMap()Creates a new instance using theBASICstrategy.
- 
MutableHashedLinkedMapCreates a mutable linked map with a default new-value-selecting merge function.- Parameters:
- strategy- the hashing strategy
 
- 
MutableHashedLinkedMappublic MutableHashedLinkedMap(it.unimi.dsi.fastutil.Hash.Strategy<? super K> strategy, MutableHashedLinkedMap.MergeFunction<K, V> merge) Creates a mutable linked map with a custom merge function.- Parameters:
- strategy- the hashing strategy
- merge- the function used when merging an existing value and a new value
 
 
- 
- 
Method Details- 
putInserts the mapping with the specified key and value pair.If there is a mapping already associated with this key, then the previous value and the specified (new) value are merged according to this collection's merge function, and the position of the entry is not modified. If there is no such mapping, then the key-value mapping is inserted at the end of this collection. - Parameters:
- key- key to be inserted
- value- (new) value to be associated with the key
- Returns:
- the previous value associated with the specified key, or nullif there was no mapping for the key
 
- 
contains
- 
isEmptypublic boolean isEmpty()
- 
remove
- 
get
- 
iterator
- 
putFirstInserts the mapping with the specified key and value pair at the beginning of this map.If there is a mapping already associated with this key, then the previous value and the specified (new) value are first merged according to this map's merge function, then the entry is moved to the beginning of the map. - Parameters:
- key- key to be inserted at the beginning
- value- (new) value to be associated with the key
- Returns:
- the previous value associated with the specified key, or nullif there was no mapping for the key
- See Also:
 
- 
putAfterInserts the mapping with this key and value pair immediately after the entry with the specified positioning key.If the specified positioning key is not present within this map, then this method behaves like put(Object, Object). If there is a mapping already associated with this key, then the previous value and the specified (new) value are first merged according to this map's merge function, then the entry is moved to directly after the entry with the specified positioning key.- Parameters:
- after- the key to position this new entry afterwards
- key- key to be inserted at the beginning
- value- (new) value to be associated with the key
- Returns:
- the previous value associated with the specified key, or nullif there was no mapping for the key
- See Also:
 
- 
putBeforeInserts the mapping with this key and value pair immediately before the entry with the specified positioning key.If the specified positioning key is not present within this map, then this method behaves like put(Object, Object). If there is a mapping already associated with this key, then the previous value and the specified (new) value are first merged according to this map's merge function, then the entry is moved to directly before the entry with the specified positioning key.- Parameters:
- before- the key to position this new entry afterwards
- key- key to be inserted at the beginning
- value- (new) value to be associated with the key
- Returns:
- the previous value associated with the specified key, or nullif there was no mapping for the key
- See Also:
 
- 
remove
 
-