Package org.kingdoms.utils.hash
Class EntityWeakHashMap<E extends org.bukkit.entity.Entity,V>
java.lang.Object
org.kingdoms.utils.hash.EntityHashContainer<EntityWeakHashMap<E,V>,E>
org.kingdoms.utils.hash.EntityHashMap<EntityWeakHashMap<E,V>,E,V>
org.kingdoms.utils.hash.EntityWeakHashMap<E,V>
- All Implemented Interfaces:
Map<E,V>
public final class EntityWeakHashMap<E extends org.bukkit.entity.Entity,V>
extends EntityHashMap<EntityWeakHashMap<E,V>,E,V>
-
Nested Class Summary
Nested classes/interfaces inherited from class org.kingdoms.utils.hash.EntityHashMap
EntityHashMap.Builder<M extends EntityHashMap<M,E, V>, E extends org.bukkit.entity.Entity, V>, EntityHashMap.WeakBuilder<E extends org.bukkit.entity.Entity, V> -
Field Summary
Fields inherited from class org.kingdoms.utils.hash.EntityHashContainer
deathHandle, entityClass, leaveHandle -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEntityWeakHashMap(Class<E> entityClass, int size, BiConsumer<EntityWeakHashMap<E, V>, E> leaveHandle, BiConsumer<EntityWeakHashMap<E, V>, E> deathHandle) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()computeIfAbsent(E key, @NotNull Function<? super E, ? extends V> mappingFunction) computeIfPresent(E key, @NotNull BiFunction<? super E, ? super V, ? extends V> remappingFunction) booleancontainsKey(E entity) booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()voidforEach(BiConsumer<? super E, ? super V> action) getOrDefault(Object key, V defaultValue) booleanisEmpty()keySet()voidputIfAbsent(E key, V value) booleanbooleanvoidreplaceAll(BiFunction<? super E, ? super V, ? extends V> function) intsize()toString()@NotNull Collection<V> values()Methods inherited from class org.kingdoms.utils.hash.EntityHashMap
weakBuilder
-
Constructor Details
-
EntityWeakHashMap
protected EntityWeakHashMap(Class<E> entityClass, int size, BiConsumer<EntityWeakHashMap<E, V>, E> leaveHandle, BiConsumer<EntityWeakHashMap<E, V>, E> deathHandle)
-
-
Method Details
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
-
containsValue
-
get
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-
put
-
remove
- Specified by:
removein classEntityHashMap<EntityWeakHashMap<E extends org.bukkit.entity.Entity,V>, E extends org.bukkit.entity.Entity, V>
-
containsKey
- Specified by:
containsKeyin classEntityHashMap<EntityWeakHashMap<E extends org.bukkit.entity.Entity,V>, E extends org.bukkit.entity.Entity, V>
-
getOrDefault
-
forEach
-
replaceAll
-
putIfAbsent
-
remove
-
replace
-
replace
-
computeIfAbsent
-
computeIfPresent
-
compute
-
merge
-
toString
-