Package com.hypixel.hytale.common.map
Class DefaultMap<K,V>
java.lang.Object
com.hypixel.hytale.common.map.DefaultMap<K,V>
- All Implemented Interfaces:
Map<K,V>
-
Nested Class Summary
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultMap(V defaultValue) DefaultMap(V defaultValue, Map<K, V> delegate) DefaultMap(V defaultValue, Map<K, V> delegate, boolean allowReplacing) DefaultMap(V defaultValue, Map<K, V> delegate, boolean allowReplacing, boolean replaceNullWithDefault) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction) computeIfPresent(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()booleanvoidforEach(BiConsumer<? super K, ? super V> action) getOrDefault(Object key, V defaultValue) inthashCode()booleanisEmpty()keySet()voidputIfAbsent(K key, V value) booleanbooleanvoidreplaceAll(BiFunction<? super K, ? super V, ? extends V> function) voidsetDefaultValue(V defaultValue) intsize()toString()values()
-
Field Details
-
delegate
-
allowReplacing
private final boolean allowReplacing -
replaceNullWithDefault
private final boolean replaceNullWithDefault -
defaultValue
-
-
Constructor Details
-
DefaultMap
-
DefaultMap
-
DefaultMap
-
DefaultMap
-
-
Method Details
-
getDefaultValue
-
setDefaultValue
-
getDelegate
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKeyin interfaceMap<K,V>
-
containsValue
- Specified by:
containsValuein interfaceMap<K,V>
-
get
-
put
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-
equals
-
hashCode
public int hashCode() -
getOrDefault
- Specified by:
getOrDefaultin interfaceMap<K,V>
-
forEach
-
replaceAll
- Specified by:
replaceAllin interfaceMap<K,V>
-
putIfAbsent
- Specified by:
putIfAbsentin interfaceMap<K,V>
-
remove
-
replace
-
replace
-
computeIfAbsent
- Specified by:
computeIfAbsentin interfaceMap<K,V>
-
computeIfPresent
@Nullable public V computeIfPresent(K key, @Nonnull BiFunction<? super K, ? super V, ? extends V> remappingFunction) - Specified by:
computeIfPresentin interfaceMap<K,V>
-
compute
-
merge
-
toString
-