Class MapTemplate.Options

java.lang.Object
io.github.projectunified.maptemplate.MapTemplate.Options
Enclosing class:
MapTemplate

public static class MapTemplate.Options extends Object
Configuration options for MapTemplate. This class is immutable; use MapTemplate.Builder to create instances.
  • Constructor Details

    • Options

      public Options(String startVariable, String endVariable, String escapeChar, Function<String,Object> variableFunction)
      Create a new instance of MapTemplate.Options with the specified configuration.
      Parameters:
      startVariable - the string that indicates the start of a variable
      endVariable - the string that indicates the end of a variable
      escapeChar - the character used to escape markers
      variableFunction - the function used to resolve variable values by name
  • Method Details

    • getStartVariable

      public String getStartVariable()
      The string that indicates the start of a variable (e.g., "{").
      Returns:
      start marker
    • getEndVariable

      public String getEndVariable()
      The string that indicates the end of a variable (e.g., "}").
      Returns:
      end marker
    • getEscapeChar

      public String getEscapeChar()
      The character used to escape markers (e.g., "\").
      Returns:
      escape character
    • getVariableFunction

      public Function<String,Object> getVariableFunction()
      The function used to resolve variable values by name.
      Returns:
      variable resolution function
    • toBuilder

      public MapTemplate.Builder toBuilder()
      Create a new MapTemplate.Builder initialized with these options.
      Returns:
      a new builder