Class MapTemplate.Options
java.lang.Object
io.github.projectunified.maptemplate.MapTemplate.Options
- Enclosing class:
MapTemplate
Configuration options for
MapTemplate.
This class is immutable; use MapTemplate.Builder to create instances.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe string that indicates the end of a variable (e.g., "}").The character used to escape markers (e.g., "\").The string that indicates the start of a variable (e.g., "{").The function used to resolve variable values by name.Create a newMapTemplate.Builderinitialized with these options.
-
Constructor Details
-
Options
public Options(String startVariable, String endVariable, String escapeChar, Function<String, Object> variableFunction) Create a new instance ofMapTemplate.Optionswith the specified configuration.- Parameters:
startVariable- the string that indicates the start of a variableendVariable- the string that indicates the end of a variableescapeChar- the character used to escape markersvariableFunction- the function used to resolve variable values by name
-
-
Method Details
-
getStartVariable
The string that indicates the start of a variable (e.g., "{").- Returns:
- start marker
-
getEndVariable
The string that indicates the end of a variable (e.g., "}").- Returns:
- end marker
-
getEscapeChar
The character used to escape markers (e.g., "\").- Returns:
- escape character
-
getVariableFunction
The function used to resolve variable values by name.- Returns:
- variable resolution function
-
toBuilder
Create a newMapTemplate.Builderinitialized with these options.- Returns:
- a new builder
-