Package io.vertx.uritemplate
Class ExpandOptions
- java.lang.Object
-
- io.vertx.uritemplate.ExpandOptions
-
public class ExpandOptions extends Object
Options to control template expansion.
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
DEFAULT_ALLOW_VARIABLE_MISS
Default value forallowVariableMiss
field =true
as mandated by the RFC.
-
Constructor Summary
Constructors Constructor Description ExpandOptions()
ExpandOptions(JsonObject json)
ExpandOptions(ExpandOptions that)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getAllowVariableMiss()
ExpandOptions
setAllowVariableMiss(boolean allowVariableMiss)
Configures whether a template missing variable is replaced by the empty string or triggers aNoSuchElementException
to be thrown.JsonObject
toJson()
-
-
-
Field Detail
-
DEFAULT_ALLOW_VARIABLE_MISS
public static final boolean DEFAULT_ALLOW_VARIABLE_MISS
Default value forallowVariableMiss
field =true
as mandated by the RFC.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ExpandOptions
public ExpandOptions()
-
ExpandOptions
public ExpandOptions(JsonObject json)
-
ExpandOptions
public ExpandOptions(ExpandOptions that)
-
-
Method Detail
-
getAllowVariableMiss
public boolean getAllowVariableMiss()
- Returns:
false
to trigger aNoSuchElementException
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 aNoSuchElementException
to be thrown. The default istrue
as specified by the RFC, settingfalse
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()
-
-