Class ExpandOptions

java.lang.Object
io.vertx.uritemplate.ExpandOptions

public class ExpandOptions extends Object
Options to control template expansion.
  • Field Details

    • DEFAULT_ALLOW_VARIABLE_MISS

      public static final boolean DEFAULT_ALLOW_VARIABLE_MISS
      Default value for allowVariableMiss field = true as mandated by the RFC.
      See Also:
  • Constructor Details

    • ExpandOptions

      public ExpandOptions()
    • ExpandOptions

      public ExpandOptions(JsonObject json)
    • ExpandOptions

      public ExpandOptions(ExpandOptions that)
  • Method Details

    • getAllowVariableMiss

      public boolean getAllowVariableMiss()
      Returns:
      false to trigger a NoSuchElementException when a referenced variable is missing.
    • setAllowVariableMiss

      public ExpandOptions setAllowVariableMiss(boolean allowVariableMiss)
      Configures whether a template missing variable is replaced by the empty string or triggers a NoSuchElementException to be thrown. The default is true as specified by the RFC, setting false is a custom setting not compliant with the spec.
      Parameters:
      allowVariableMiss - true to accept missing variables.
      Returns:
      a reference to this, so the API can be used fluently
    • toJson

      public JsonObject toJson()