com.github.fge.uritemplate.expression
Enum ExpressionType

java.lang.Object
  extended by java.lang.Enum<ExpressionType>
      extended by com.github.fge.uritemplate.expression.ExpressionType
All Implemented Interfaces:
Serializable, Comparable<ExpressionType>

public enum ExpressionType
extends Enum<ExpressionType>

Enumeration of all expression types

In order to understand the different setters, please refer to appendix A of RFC 6570.


Enum Constant Summary
FRAGMENT
           
NAME_LABELS
           
PATH_PARAMETERS
           
PATH_SEGMENTS
           
QUERY_CONT
           
QUERY_STRING
           
RESERVED
           
SIMPLE
           
 
Method Summary
 String getIfEmpty()
          Get the substitution string for empty values
 String getPrefix()
          Get the prefix string for this expansion type
 char getSeparator()
          Get the separator between token expansion elements
 boolean isNamed()
          Tell whether the variable name should be used in expansion
 boolean isRawExpand()
          Tell whether the character set to be used for expansion includes the reserved characters
static ExpressionType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ExpressionType[] 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
 

Enum Constant Detail

SIMPLE

public static final ExpressionType SIMPLE

RESERVED

public static final ExpressionType RESERVED

NAME_LABELS

public static final ExpressionType NAME_LABELS

PATH_SEGMENTS

public static final ExpressionType PATH_SEGMENTS

PATH_PARAMETERS

public static final ExpressionType PATH_PARAMETERS

QUERY_STRING

public static final ExpressionType QUERY_STRING

QUERY_CONT

public static final ExpressionType QUERY_CONT

FRAGMENT

public static final ExpressionType FRAGMENT
Method Detail

values

public static ExpressionType[] 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 (ExpressionType c : ExpressionType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ExpressionType valueOf(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getPrefix

public String getPrefix()
Get the prefix string for this expansion type

Returns:
the prefix string

isNamed

public boolean isNamed()
Tell whether the variable name should be used in expansion

Returns:
true if this is the case

getIfEmpty

public String getIfEmpty()
Get the substitution string for empty values

Returns:
the substitution string

isRawExpand

public boolean isRawExpand()
Tell whether the character set to be used for expansion includes the reserved characters

Returns:
true if this is the case

getSeparator

public char getSeparator()
Get the separator between token expansion elements

Returns:
the separator