类 MutableHashedLinkedMap<K,V>
- 类型参数:
K
- the type of keysV
- the type of mapped values
-
嵌套类概要
嵌套类修饰符和类型类说明private static final class
private final class
private static final class
static interface
-
字段概要
字段修饰符和类型字段说明static final it.unimi.dsi.fastutil.Hash.Strategy
<? super Object> A strategy that usesObjects.hashCode(Object)
andObject.equals(Object)
.private int
private MutableHashedLinkedMap<K,
V>.Entry static final it.unimi.dsi.fastutil.Hash.Strategy
<? super Object> A strategy that usesSystem.identityHashCode(Object)
anda == b
comparisons.private MutableHashedLinkedMap<K,
V>.Entry private final MutableHashedLinkedMap.MergeFunction
<K, V> private final it.unimi.dsi.fastutil.Hash.Strategy
<? super K> -
构造器概要
构造器构造器说明Creates a new instance using theBASIC
strategy.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. -
方法概要
修饰符和类型方法说明boolean
boolean
isEmpty()
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 void
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 java.lang.Iterable
forEach, spliterator
-
字段详细资料
-
BASIC
A strategy that usesObjects.hashCode(Object)
andObject.equals(Object)
. -
IDENTITY
A strategy that usesSystem.identityHashCode(Object)
anda == b
comparisons. -
strategy
-
entries
-
merge
-
head
-
last
-
changes
private transient int changes
-
-
构造器详细资料
-
MutableHashedLinkedMap
public MutableHashedLinkedMap()Creates a new instance using theBASIC
strategy. -
MutableHashedLinkedMap
Creates a mutable linked map with a default new-value-selecting merge function.- 参数:
strategy
- the hashing strategy
-
MutableHashedLinkedMap
public 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.- 参数:
strategy
- the hashing strategymerge
- the function used when merging an existing value and a new value
-
-
方法详细资料
-
put
Inserts 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.
- 参数:
key
- key to be insertedvalue
- (new) value to be associated with the key- 返回:
- the previous value associated with the specified key, or
null
if there was no mapping for the key
-
contains
-
isEmpty
public boolean isEmpty() -
remove
-
get
-
iterator
-
putFirst
Inserts 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.
- 参数:
key
- key to be inserted at the beginningvalue
- (new) value to be associated with the key- 返回:
- the previous value associated with the specified key, or
null
if there was no mapping for the key - 另请参阅:
-
putAfter
Inserts 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.- 参数:
after
- the key to position this new entry afterwardskey
- key to be inserted at the beginningvalue
- (new) value to be associated with the key- 返回:
- the previous value associated with the specified key, or
null
if there was no mapping for the key - 另请参阅:
-
putBefore
Inserts 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.- 参数:
before
- the key to position this new entry afterwardskey
- key to be inserted at the beginningvalue
- (new) value to be associated with the key- 返回:
- the previous value associated with the specified key, or
null
if there was no mapping for the key - 另请参阅:
-
remove
-