Interface UriTemplate.PathSegment

All Superinterfaces:
CharSequence
Enclosing class:
UriTemplate

protected static interface UriTemplate.PathSegment extends CharSequence
Represents an expandable path segment.
  • Method Details

    • isQuerySegment

      default boolean isQuerySegment()
      Returns:
      Whether this segment is part of the query string
    • getVariable

      default Optional<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 parameters
      previousHasContent - Whether there was previous content
      anyPreviousHasOperator - Whether an operator is present
      Returns:
      The expanded string