|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.util.Variable
public final class Variable
Variable descriptor for reference templates.
Template
Field Summary | |
---|---|
static int |
TYPE_ALL
Matches all characters. |
static int |
TYPE_ALPHA
Matches all alphabetical characters. |
static int |
TYPE_ALPHA_DIGIT
Matches all alphabetical and digital characters. |
static int |
TYPE_DIGIT
Matches all digital characters. |
static int |
TYPE_URI_ALL
Matches all URI characters. |
static int |
TYPE_URI_FRAGMENT
Matches URI fragment characters. |
static int |
TYPE_URI_QUERY
Matches URI query characters. |
static int |
TYPE_URI_SCHEME
Matches URI scheme characters. |
static int |
TYPE_URI_SEGMENT
Matches URI segment characters. |
static int |
TYPE_URI_UNRESERVED
Matches unreserved URI characters. |
static int |
TYPE_WORD
Matches all alphabetical and digital characters plus the underscore. |
Constructor Summary | |
---|---|
Variable()
Default constructor. |
|
Variable(int type)
Constructor. |
|
Variable(int type,
String defaultValue,
boolean required,
boolean fixed)
Constructor. |
Method Summary | |
---|---|
String |
getDefaultValue()
Returns the default value to use if the key couldn't be found in the model. |
int |
getType()
Returns the type of variable. |
boolean |
isFixed()
Returns true if the value is fixed, in which case the "defaultValue" property is always used. |
boolean |
isRequired()
Returns true if the variable is required or optional. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TYPE_ALL
public static final int TYPE_ALPHA
public static final int TYPE_ALPHA_DIGIT
public static final int TYPE_DIGIT
public static final int TYPE_URI_ALL
public static final int TYPE_URI_FRAGMENT
public static final int TYPE_URI_QUERY
public static final int TYPE_URI_SCHEME
public static final int TYPE_URI_SEGMENT
public static final int TYPE_URI_UNRESERVED
public static final int TYPE_WORD
Constructor Detail |
---|
public Variable()
public Variable(int type)
type
- The type of variable. See TYPE_* constants.public Variable(int type, String defaultValue, boolean required, boolean fixed)
type
- The type of variable. See TYPE_* constants.defaultValue
- The default value to use if the key couldn't be found in the
model.required
- Indicates if the variable is required or optional.fixed
- Indicates if the value is fixed, in which case the
"defaultValue" property is always used.Method Detail |
---|
public int getType()
public String getDefaultValue()
public boolean isRequired()
public boolean isFixed()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |