Class DataComponent.Map
java.lang.Object
com.saicone.rtag.data.DataComponent.Map
- Enclosing class:
DataComponent
Class to invoke methods from DataComponentMap.
A component map acts like an immutable map in java with the regular conception of components by Mojang.
A component map acts like an immutable map in java with the regular conception of components by Mojang.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic DataComponent.Builder<Object> builder()Create a DataComponentMap builder to set values and then wrap into component map.static ObjectGet a declared component type from provided component map.Get the map value from component map.static booleanCheck if the provided component map has any type of DataComponentType inside.static booleanCheck if the provided component map is empty.Get a DataComponentType key set from component map.static intGet the size of provided component map.
-
Field Details
-
EMPTY
An empty DataComponentMap instance.
-
-
Method Details
-
builder
Create a DataComponentMap builder to set values and then wrap into component map.- Returns:
- a newly generated builder to edit.
-
size
Get the size of provided component map.- Parameters:
map- the component map to get size.- Returns:
- the number of data type elements in provided component map.
-
isEmpty
Check if the provided component map is empty.- Parameters:
map- the component map to check.- Returns:
- true if the component map has no elements.
-
get
Get a declared component type from provided component map.- Parameters:
map- the component map to get component from.type- the DataComponentType instance that declares a component type.- Returns:
- the component declared type from data component cache if exists, null otherwise.
-
has
-
getValue
-
keySet
-