Package io.micronaut.http.uri
Interface UriTemplate.PathSegment
-
- All Superinterfaces:
java.lang.CharSequence
- Enclosing class:
- UriTemplate
protected static interface UriTemplate.PathSegment extends java.lang.CharSequenceRepresents an expandable path segment.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.lang.Stringexpand(java.util.Map<java.lang.String,java.lang.Object> parameters, boolean previousHasContent, boolean anyPreviousHasOperator)Expands the query segment.default java.util.Optional<java.lang.String>getVariable()If this path segment represents a variable returns the underlying variable name.default booleanisQuerySegment()default booleanisVariable()
-
-
-
Method Detail
-
isQuerySegment
default boolean isQuerySegment()
- Returns:
- Whether this segment is part of the query string
-
getVariable
default java.util.Optional<java.lang.String> getVariable()
If this path segment represents a variable returns the underlying variable name.- Returns:
- The variable name if present
-
isVariable
default boolean isVariable()
- Returns:
- True if this is a variable segment
-
expand
java.lang.String expand(java.util.Map<java.lang.String,java.lang.Object> parameters, boolean previousHasContent, boolean anyPreviousHasOperator)Expands the query segment.- Parameters:
parameters- The parameterspreviousHasContent- Whether there was previous contentanyPreviousHasOperator- Whether an operator is present- Returns:
- The expanded string
-
-