Enum UriTemplate.CompositeOutput

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      AMP
      Form-style query continuation.
      DOT
      Label expansion with dot-prefix.
      FORWARD_SLASH
      Path segment expansion.
      HASH
      Fragment expansion.
      PLUS
      Reserved expansion.
      QUERY
      Form-style query expansion.
      SEMI_COLON
      Path segment parameter expansion.
      SIMPLE
      Simple expansion.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private CompositeOutput​(java.lang.Character propertyPrefix, java.lang.String outputPrefix, java.lang.String explodeJoiner, boolean requiresVarAssignment, boolean reservedExpansion)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) java.lang.String getEncodedValue​(java.lang.String value)
      Encodes the specified value.
      (package private) java.lang.String getExplodeJoiner()
      Returns the delimiter used to join composite values.
      (package private) java.lang.String getOutputPrefix()
      Returns the string that should be prefixed to the expanded template.
      (package private) boolean getReservedExpansion()  
      (package private) int getVarNameStartIndex()
      Returns the start index of the var name.
      (package private) boolean requiresVarAssignment()
      Returns whether or not the expanded template should contain an assignment with the variable.
      static UriTemplate.CompositeOutput valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static UriTemplate.CompositeOutput[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • propertyPrefix

        private final java.lang.Character propertyPrefix
      • outputPrefix

        private final java.lang.String outputPrefix
      • explodeJoiner

        private final java.lang.String explodeJoiner
      • requiresVarAssignment

        private final boolean requiresVarAssignment
      • reservedExpansion

        private final boolean reservedExpansion
    • Constructor Detail

      • CompositeOutput

        private CompositeOutput​(java.lang.Character propertyPrefix,
                                java.lang.String outputPrefix,
                                java.lang.String explodeJoiner,
                                boolean requiresVarAssignment,
                                boolean reservedExpansion)
        Parameters:
        propertyPrefix - The prefix of a parameter or null for none. In {+var} the prefix is '+'
        outputPrefix - The string that should be prefixed to the expanded template.
        explodeJoiner - The delimiter used to join composite values.
        requiresVarAssignment - Denotes whether or not the expanded template should contain an assignment with the variable.
        reservedExpansion - Reserved expansion allows pct-encoded triplets and characters in the reserved set.
    • Method Detail

      • values

        public static UriTemplate.CompositeOutput[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (UriTemplate.CompositeOutput c : UriTemplate.CompositeOutput.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static UriTemplate.CompositeOutput valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getOutputPrefix

        java.lang.String getOutputPrefix()
        Returns the string that should be prefixed to the expanded template.
      • getExplodeJoiner

        java.lang.String getExplodeJoiner()
        Returns the delimiter used to join composite values.
      • requiresVarAssignment

        boolean requiresVarAssignment()
        Returns whether or not the expanded template should contain an assignment with the variable.
      • getVarNameStartIndex

        int getVarNameStartIndex()
        Returns the start index of the var name. If the variable contains a prefix the start index will be 1 else it will be 0.
      • getEncodedValue

        java.lang.String getEncodedValue​(java.lang.String value)
        Encodes the specified value. If reserved expansion is turned on then pct-encoded triplets and characters are allowed in the reserved set.
        Parameters:
        value - The string to be encoded.
        Returns:
        The encoded string.
      • getReservedExpansion

        boolean getReservedExpansion()