K - The type of keyV - The type of valueM - The mutable variant of this manipulatorI - The immutable variant of this manipulatorpublic interface MappedData<K,V,M extends MappedData<K,V,M,I>,I extends ImmutableMappedData<K,V,I,M>> extends DataManipulator<M,I>
DataManipulator that uses a Map.| Modifier and Type | Method and Description |
|---|---|
default Map<K,V> |
asMap()
Gets this manipulator as a
Map. |
Optional<V> |
get(K key)
Gets the
value for the provided key, if available. |
Set<K> |
getMapKeys()
Gets a
Set of keys available in this manipulator. |
MapValue<K,V> |
getMapValue()
Gets the
MapValue of this manipulator. |
default Set<Map.Entry<K,V>> |
getMapValues()
|
M |
put(K key,
V value)
Sets the
value with the provided key. |
M |
putAll(Map<? extends K,? extends V> map)
Sets all available
Map.entrySet() values into this
MappedData manipulator. |
M |
remove(K key)
Removes any values keyed to the provided
key. |
asImmutable, copy, fill, fill, from, set, set, set, set, transformgetContentVersion, toContainerOptional<V> get(K key)
value for the provided key, if available.key - The keyMap.get(Object)Set<K> getMapKeys()
Set of keys available in this manipulator.Map.keySet()default Set<Map.Entry<K,V>> getMapValues()
Map.entrySet()MapValue<K,V> getMapValue()
MapValue of this manipulator.M put(K key, V value)
value with the provided key.key - The keyvalue - The valueMap.put(Object, Object)M putAll(Map<? extends K,? extends V> map)
Map.entrySet() values into this
MappedData manipulator.map - The map containing keys and valuesMap.putAll(Map)M remove(K key)
key.key - The key to remove the value ofMap.remove(Object)