Class DataComponent.Builder<V>
java.lang.Object
com.saicone.rtag.data.DataComponent.Builder<V>
- Enclosing class:
DataComponent
Class wrapper to invoke methods from map and patch data component types builder.
This is not the real class, it's just a bridge between to set and get values before build.
This is not the real class, it's just a bridge between to set and get values before build.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the required instance of data component.
By default, this method throws an exception, so should be overridden.Get a declared component type from builder.Return the real data component builder that is wrapped inside this class.getMap()Return the map inside real component builder.booleanCheck if the current builder contains a DataComponentType.
On a component patch builder this method may not work to check the availability of provided type due the map can contain empty values.Remove the provided DataComponentType mapping from builder and return this instance.Set provided object type by a DataComponentType declaration of object itself as value type into builder and return this instance.
-
Constructor Details
-
Builder
-
-
Method Details
-
getBuilder
Return the real data component builder that is wrapped inside this class.- Returns:
- a map or patch data component builder.
-
getMap
-
has
Check if the current builder contains a DataComponentType.
On a component patch builder this method may not work to check the availability of provided type due the map can contain empty values.- Parameters:
type- the DataComponentType to check if exist inside.- Returns:
- true if component type exists.
-
get
-
set
Set provided object type by a DataComponentType declaration of object itself as value type into builder and return this instance.- Parameters:
type- the DataComponentType instance.value- the object value declared by component type as value type.- Returns:
- the builder itself.
-
remove
Remove the provided DataComponentType mapping from builder and return this instance.- Parameters:
type- the DataComponentType instance to remove.- Returns:
- the builder itself.
-
build
Build the required instance of data component.
By default, this method throws an exception, so should be overridden.- Returns:
- an object instance that was building this builder.
-