Package io.micronaut.http.uri
Interface UriTemplate.PathSegment
- All Superinterfaces:
CharSequence
- Enclosing class:
- UriTemplate
Represents an expandable path segment.
-
Method Summary
Modifier and TypeMethodDescriptionExpands the query segment.If this path segment represents a variable returns the underlying variable name.default boolean
default boolean
Methods inherited from interface java.lang.CharSequence
charAt, chars, codePoints, isEmpty, length, subSequence, toString
-
Method Details
-
isQuerySegment
default boolean isQuerySegment()- Returns:
- Whether this segment is part of the query 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
String expand(Map<String, 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
-