Interface UriTemplate.PathSegment

  • All Superinterfaces:
    java.lang.CharSequence
    Enclosing class:
    UriTemplate

    protected static interface UriTemplate.PathSegment
    extends java.lang.CharSequence
    Represents an expandable path segment.
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      java.lang.String expand​(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 boolean isQuerySegment()  
      default boolean isVariable()  
      • Methods inherited from interface java.lang.CharSequence

        charAt, chars, codePoints, length, subSequence, toString
    • 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 parameters
        previousHasContent - Whether there was previous content
        anyPreviousHasOperator - Whether an operator is present
        Returns:
        The expanded string