Spring Hateoas

org.springframework.hateoas
Class TemplateVariable

java.lang.Object
  extended by org.springframework.hateoas.TemplateVariable
All Implemented Interfaces:
Serializable

public final class TemplateVariable
extends Object
implements Serializable

A single template variable.

Author:
Oliver Gierke
See Also:
Serialized Form

Nested Class Summary
static class TemplateVariable.VariableType
          An enumeration for all supported variable types.
 
Constructor Summary
TemplateVariable(String name, TemplateVariable.VariableType type)
          Creates a new TemplateVariable with the given name and type.
TemplateVariable(String name, TemplateVariable.VariableType type, String description)
          Creates a new TemplateVariable with the given name, type and description.
 
Method Summary
 boolean equals(Object obj)
           
 String getDescription()
          Returns the description of the variable.
 String getName()
          Returns the name of the variable.
 TemplateVariable.VariableType getType()
          Returns the type of the variable.
 boolean hasDescription()
          Returns whether the variable has a description.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TemplateVariable

public TemplateVariable(String name,
                        TemplateVariable.VariableType type)
Creates a new TemplateVariable with the given name and type.

Parameters:
name - must not be null or empty.
type - must not be null.

TemplateVariable

public TemplateVariable(String name,
                        TemplateVariable.VariableType type,
                        String description)
Creates a new TemplateVariable with the given name, type and description.

Parameters:
name - must not be null or empty.
type - must not be null.
description - must not be null.
Method Detail

getName

public String getName()
Returns the name of the variable.

Returns:

getType

public TemplateVariable.VariableType getType()
Returns the type of the variable.

Returns:
the type

getDescription

public String getDescription()
Returns the description of the variable.

Returns:

hasDescription

public boolean hasDescription()
Returns whether the variable has a description.

Returns:

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

Spring Hateoas

Copyright © 2012-2014–2014 Pivotal, Inc.. All rights reserved.