Class BlockMap<V>
- All Implemented Interfaces:
Map<BlockVector3,V>
A space-efficient map implementation for block locations.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
compute(BlockVector3 key, BiFunction<? super BlockVector3,? super V,? extends V> remappingFunction)
computeIfAbsent(BlockVector3 key, Function<? super BlockVector3,? extends V> mappingFunction)
computeIfPresent(BlockVector3 key, BiFunction<? super BlockVector3,? super V,? extends V> remappingFunction)
boolean
containsKey(Object key)
boolean
containsValue(Object value)
static <V> BlockMap<V>
copyOf(Map<? extends BlockVector3,? extends V> source)
static <V> BlockMap<V>
create()
entrySet()
boolean
void
forEach(BiConsumer<? super BlockVector3,? super V> action)
getOrDefault(Object key, V defaultValue)
int
hashCode()
merge(BlockVector3 key, V value, BiFunction<? super V,? super V,? extends V> remappingFunction)
put(BlockVector3 key, V value)
void
putAll(Map<? extends BlockVector3,? extends V> m)
putIfAbsent(BlockVector3 key, V value)
boolean
replace(BlockVector3 key, V value)
boolean
replace(BlockVector3 key, V oldValue, V newValue)
void
replaceAll(BiFunction<? super BlockVector3,? super V,? extends V> function)
int
size()
values()
Methods inherited from class java.util.AbstractMap
clone, isEmpty, keySet, toString
-
Method Details
-
create
-
createForBaseBlock
-
copyOf
-
put
- Specified by:
put
in interfaceMap<BlockVector3,V>
- Overrides:
put
in classAbstractMap<BlockVector3,V>
-
getOrDefault
-
forEach
-
replaceAll
-
putIfAbsent
-
remove
-
replace
-
replace
-
computeIfAbsent
public V computeIfAbsent(BlockVector3 key, Function<? super BlockVector3,? extends V> mappingFunction) -
computeIfPresent
public V computeIfPresent(BlockVector3 key, BiFunction<? super BlockVector3,? super V,? extends V> remappingFunction) -
compute
public V compute(BlockVector3 key, BiFunction<? super BlockVector3,? super V,? extends V> remappingFunction) -
merge
public V merge(BlockVector3 key, V value, BiFunction<? super V,? super V,? extends V> remappingFunction) -
entrySet
- Specified by:
entrySet
in interfaceMap<BlockVector3,V>
- Specified by:
entrySet
in classAbstractMap<BlockVector3,V>
-
containsValue
- Specified by:
containsValue
in interfaceMap<BlockVector3,V>
- Overrides:
containsValue
in classAbstractMap<BlockVector3,V>
-
containsKey
- Specified by:
containsKey
in interfaceMap<BlockVector3,V>
- Overrides:
containsKey
in classAbstractMap<BlockVector3,V>
-
get
- Specified by:
get
in interfaceMap<BlockVector3,V>
- Overrides:
get
in classAbstractMap<BlockVector3,V>
-
remove
- Specified by:
remove
in interfaceMap<BlockVector3,V>
- Overrides:
remove
in classAbstractMap<BlockVector3,V>
-
putAll
- Specified by:
putAll
in interfaceMap<BlockVector3,V>
- Overrides:
putAll
in classAbstractMap<BlockVector3,V>
-
clear
public void clear()- Specified by:
clear
in interfaceMap<BlockVector3,V>
- Overrides:
clear
in classAbstractMap<BlockVector3,V>
-
size
public int size()- Specified by:
size
in interfaceMap<BlockVector3,V>
- Overrides:
size
in classAbstractMap<BlockVector3,V>
-
values
- Specified by:
values
in interfaceMap<BlockVector3,V>
- Overrides:
values
in classAbstractMap<BlockVector3,V>
-
equals
- Specified by:
equals
in interfaceMap<BlockVector3,V>
- Overrides:
equals
in classAbstractMap<BlockVector3,V>
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfaceMap<BlockVector3,V>
- Overrides:
hashCode
in classAbstractMap<BlockVector3,V>
-