Package com.damnhandy.uri.template.impl
Enum Operator
- java.lang.Object
-
- java.lang.Enum<Operator>
-
- com.damnhandy.uri.template.impl.Operator
-
- All Implemented Interfaces:
Serializable
,Comparable<Operator>
public enum Operator extends Enum<Operator>
An enum representing an operator in a URI Template.
.------------------------------------------------------------------. | NUL + . / ; ? & # | |------------------------------------------------------------------| | first | "" "" "." "/" ";" "?" "&" "#" | | sep | "," "," "." "/" ";" "&" "&" "," | | named | false false false false true true true false | | ifemp | "" "" "" "" "" "=" "=" "" | | allow | U U+R U U U U U U+R | `------------------------------------------------------------------'
- Version:
- $Revision: 1.1 $
- Author:
- Ryan J. McDonough
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CONTINUATION
FRAGMENT
MATRIX
NAME_LABEL
NUL
PATH
QUERY
RESERVED
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Operator
fromOpCode(String opCode)
FIXME Comment thisUriTemplate.Encoding
getEncoding()
String
getListSeparator()
String
getOperator()
String
getPrefix()
String
getSeparator()
boolean
isNamed()
boolean
useVarNameWhenExploded()
When the variable is a Collection, this flag determines if we use the VarSpec name to prefix values.static Operator
valueOf(String name)
Returns the enum constant of this type with the specified name.static Operator[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NUL
public static final Operator NUL
-
RESERVED
public static final Operator RESERVED
-
NAME_LABEL
public static final Operator NAME_LABEL
-
PATH
public static final Operator PATH
-
MATRIX
public static final Operator MATRIX
-
QUERY
public static final Operator QUERY
-
CONTINUATION
public static final Operator CONTINUATION
-
FRAGMENT
public static final Operator FRAGMENT
-
-
Method Detail
-
values
public static 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 (Operator c : 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 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 nameNullPointerException
- if the argument is null
-
getOperator
public String getOperator()
-
getSeparator
public String getSeparator()
-
getEncoding
public UriTemplate.Encoding getEncoding()
- Returns:
- the encoding to be used
-
isNamed
public boolean isNamed()
- Returns:
- tbd
-
getListSeparator
public String getListSeparator()
-
useVarNameWhenExploded
public boolean useVarNameWhenExploded()
When the variable is a Collection, this flag determines if we use the VarSpec name to prefix values. For example: {&apm;list} return false {&apm;list*} will return true- Returns:
- tbd
-
getPrefix
public String getPrefix()
- Returns:
- the prefix
-
fromOpCode
public static Operator fromOpCode(String opCode) throws IllegalArgumentException
FIXME Comment this- Parameters:
opCode
- the opertator code- Returns:
- the Operator
- Throws:
IllegalArgumentException
-
-