Class DataObjectBuilder
java.lang.Object
com.mrivanplays.annotationconfig.core.serialization.DataObjectBuilder
Represents a builder of
DataObject
. Shall be used for multi value DataObject e.g. DataObject.isSingleValue()
returning false
- Since:
- 2.1.0
- Author:
- MrIvanPlays
-
Constructor Summary
ConstructorDescriptionCreates a newDataObjectBuilder
DataObjectBuilder
(DataObject from) Creates a copy of the specifiedDataObjectBuilder
other
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds thisDataObjectBuilder
into aDataObject
copy()
Creates a new copy of thisDataObjectBuilder
Binds the specifiedvalue
to the specifiedkey
with
(String key, DataObject object) Binds the specifiedDataObject
to the specifiedkey
.with
(String key, DataObjectBuilder other) Binds the specifiedvalue
to the specifiedkey
Binds the specifiedvalue
to the specifiedkey
-
Constructor Details
-
DataObjectBuilder
public DataObjectBuilder()Creates a newDataObjectBuilder
-
DataObjectBuilder
Creates a copy of the specifiedDataObjectBuilder
other
- Parameters:
other
- builder to copy
-
DataObjectBuilder
- Parameters:
from
- the data object to build from
-
-
Method Details
-
copy
Creates a new copy of thisDataObjectBuilder
- Returns:
- copy
-
with
Binds the specifiedvalue
to the specifiedkey
- Parameters:
key
- key to bind tovalue
- value to bind- Returns:
- this instance for chaining
-
with
Binds the specifiedvalue
to the specifiedkey
- Parameters:
key
- key to bind tovalue
- value to bind- Returns:
- this instance for chaining
-
with
Binds the specifiedvalue
to the specifiedkey
- Parameters:
key
- key to bind tovalue
- value to bind- Returns:
- this instance for chaining
-
with
- Parameters:
key
- key to bind toother
- value to bind- Returns:
- this instance for chaining
-
with
Binds the specifiedDataObject
to the specifiedkey
.- Parameters:
key
- key to bind toobject
- value to bind- Returns:
- this instance for chaining
-
build
Builds thisDataObjectBuilder
into aDataObject
- Returns:
- built object
-