org.weborganic.uri.template
Enum TokenOperatorRF.Operator

java.lang.Object
  extended by java.lang.Enum<TokenOperatorRF.Operator>
      extended by org.weborganic.uri.template.TokenOperatorRF.Operator
All Implemented Interfaces:
Serializable, Comparable<TokenOperatorRF.Operator>
Enclosing class:
TokenOperatorRF

public static enum TokenOperatorRF.Operator
extends Enum<TokenOperatorRF.Operator>

The list of operators currently supported.


Enum Constant Summary
PATH_PARAMETER
          The ';' operator for path parameters.
PATH_SEGMENT
          The '/' operator for path segments.
QUERY_PARAMETER
          The '?' operator for query parameters.
URI_INSERT
          The '+' operator for URI inserts.
 
Method Summary
 char character()
          Returns the character.
static TokenOperatorRF.Operator valueOf(String name)
          Returns the enum constant of this type with the specified name.
static TokenOperatorRF.Operator[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

QUERY_PARAMETER

public static final TokenOperatorRF.Operator QUERY_PARAMETER
The '?' operator for query parameters. Example:
  undef = null;
  empty = "";
  x     = "1024";
  y     = "768";
 
 {?x,y}                    ?x=1024&y=768
 {?x,y,empty}              ?x=1024&y=768&empty=
 {?x,y,undef}              ?x=1024&y=768
 


PATH_PARAMETER

public static final TokenOperatorRF.Operator PATH_PARAMETER
The ';' operator for path parameters. Example:
  undef = null;
  empty = "";
  x     = "1024";
  y     = "768";
 
 {;x,y}                    ;x=1024;y=768
 {;x,y,empty}              ;x=1024;y=768;empty
 {;x,y,undef}              ;x=1024;y=768
 


PATH_SEGMENT

public static final TokenOperatorRF.Operator PATH_SEGMENT
The '/' operator for path segments. Example:
  list  = [ "val1", "val2", "val3" ];
  x     = "1024";
  
  {/list,x}                 /val1/val2/val3/1024
 


URI_INSERT

public static final TokenOperatorRF.Operator URI_INSERT
The '+' operator for URI inserts. Example:
 empty = ""
 path  = "/foo/bar"
 x     = "1024"
  
  {+path}/here              /foo/bar/here
  {+path,x}/here            /foo/bar,1024/here
  {+path}{x}/here           /foo/bar1024/here
  {+empty}/here             /here
 

Method Detail

values

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

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

valueOf

public static TokenOperatorRF.Operator 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

character

public char character()
Returns the character.

Returns:
The character used to represent this operator.