Package com.saicone.rtag.data
Class DataComponent.MapPatch
java.lang.Object
com.saicone.rtag.data.DataComponent.MapPatch
- Enclosing class:
- DataComponent
Class to invoke methods from PatchedDataComponentMap.
A patched map is a subclass of DataComponentMap but mutable, that means all the methods from component map are applicable in a patched map.
A patched map is a subclass of DataComponentMap but mutable, that means all the methods from component map are applicable in a patched map.
-
Method Summary
Modifier and TypeMethodDescriptionGet the map value from patched map.static Object
Remove the provided DataComponentType mapping from patched map.static Object
Set provided object type by a DataComponentType declaration of object itself into patched map.static void
Replace the map value into patched map.
-
Method Details
-
getValue
Get the map value from patched map.- Parameters:
map
- the patched map to get the value itself.- Returns:
- a Reference2ObjectMap inside patched map.
-
set
Set provided object type by a DataComponentType declaration of object itself into patched map.- Parameters:
map
- the patched map to put value into.type
- the DataComponentType instance.value
- the object value declared by component type.- Returns:
- the value that was set before in patched map, null otherwise.
-
setValue
public static void setValue(Object map, it.unimi.dsi.fastutil.objects.Reference2ObjectMap<Object, Object> value) Replace the map value into patched map.- Parameters:
map
- the patched map to set the map value.value
- a Reference2ObjectMap with DataComponentType as keys and declared objects has values.
-
remove
Remove the provided DataComponentType mapping from patched map.- Parameters:
map
- the patched map to remove component type.type
- the DataComponentType instance to remove.- Returns:
- the value that was set before in patched map, null otherwise.
-