Spring Hateoas

org.springframework.hateoas
Enum TemplateVariable.VariableType

java.lang.Object
  extended by java.lang.Enum<TemplateVariable.VariableType>
      extended by org.springframework.hateoas.TemplateVariable.VariableType
All Implemented Interfaces:
Serializable, Comparable<TemplateVariable.VariableType>
Enclosing class:
TemplateVariable

public static enum TemplateVariable.VariableType
extends Enum<TemplateVariable.VariableType>

An enumeration for all supported variable types.

Author:
Oliver Gierke

Enum Constant Summary
FRAGMENT
           
PATH_VARIABLE
           
REQUEST_PARAM
           
REQUEST_PARAM_CONTINUED
           
SEGMENT
           
 
Method Summary
 boolean canBeCombinedWith(TemplateVariable.VariableType type)
           
static TemplateVariable.VariableType from(String key)
          Returns the TemplateVariable.VariableType for the given variable key.
 boolean isOptional()
          Returns whether the variable of this type is optional.
 String toString()
           
static TemplateVariable.VariableType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static TemplateVariable.VariableType[] 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, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

PATH_VARIABLE

public static final TemplateVariable.VariableType PATH_VARIABLE

REQUEST_PARAM

public static final TemplateVariable.VariableType REQUEST_PARAM

REQUEST_PARAM_CONTINUED

public static final TemplateVariable.VariableType REQUEST_PARAM_CONTINUED

SEGMENT

public static final TemplateVariable.VariableType SEGMENT

FRAGMENT

public static final TemplateVariable.VariableType FRAGMENT
Method Detail

values

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

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

valueOf

public static TemplateVariable.VariableType 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

isOptional

public boolean isOptional()
Returns whether the variable of this type is optional.

Returns:

canBeCombinedWith

public boolean canBeCombinedWith(TemplateVariable.VariableType type)

from

public static TemplateVariable.VariableType from(String key)
Returns the TemplateVariable.VariableType for the given variable key.

Parameters:
key - must not be null.
Returns:

toString

public String toString()
Overrides:
toString in class Enum<TemplateVariable.VariableType>

Spring Hateoas

Copyright © 2012-2014-2014 Pivotal, Inc.. All Rights Reserved.