Class ConcurrentPlayerMap<TValue>
java.lang.Object
java.util.AbstractMap<org.bukkit.entity.Player,TValue>
com.comphenix.protocol.concurrency.ConcurrentPlayerMap<TValue>
- All Implemented Interfaces:
ConcurrentMap<org.bukkit.entity.Player,,TValue> Map<org.bukkit.entity.Player,TValue>
public class ConcurrentPlayerMap<TValue>
extends AbstractMap<org.bukkit.entity.Player,TValue>
implements ConcurrentMap<org.bukkit.entity.Player,TValue>
Represents a concurrent player map.
This map may use player addresses as keys.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumRepresents the different standard player keys,Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Constructor Summary
ConstructorsConstructorDescriptionConcurrentPlayerMap(com.google.common.base.Function<org.bukkit.entity.Player, Object> method) Construct a new concurrent player map using the given custom key method. -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsKey(Object key) entrySet()putIfAbsent(org.bukkit.entity.Player key, TValue value) booleanbooleanstatic <T> ConcurrentPlayerMap<T> Construct a new concurrent player map that uses each player's address as key.static <T> ConcurrentPlayerMap<T> Construct a new concurrent player map that uses each player's name as key.Methods inherited from class java.util.AbstractMap
clear, clone, containsValue, equals, hashCode, isEmpty, keySet, putAll, size, toString, valuesMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.concurrent.ConcurrentMap
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, replaceAll
-
Constructor Details
-
ConcurrentPlayerMap
Construct a new concurrent player map using the given custom key method.- Parameters:
method- - custom key method.
-
-
Method Details
-
usingAddress
Construct a new concurrent player map that uses each player's address as key.- Type Parameters:
T- Parameter type- Returns:
- Concurrent player map.
-
usingName
Construct a new concurrent player map that uses each player's name as key.- Type Parameters:
T- Parameter type- Returns:
- Concurrent player map.
-
put
-
putIfAbsent
- Specified by:
putIfAbsentin interfaceConcurrentMap<org.bukkit.entity.Player,TValue> - Specified by:
putIfAbsentin interfaceMap<org.bukkit.entity.Player,TValue>
-
replace
-
replace
-
remove
-
remove
-
get
-
containsKey
- Specified by:
containsKeyin interfaceMap<org.bukkit.entity.Player,TValue> - Overrides:
containsKeyin classAbstractMap<org.bukkit.entity.Player,TValue>
-
entrySet
-