com.github.fge.uritemplate.expression
Class TemplateExpression

java.lang.Object
  extended by com.github.fge.uritemplate.expression.TemplateExpression
All Implemented Interfaces:
URITemplateExpression

public final class TemplateExpression
extends Object
implements URITemplateExpression

Template expression (ie, not literal) rendering class

This class ultimately handles all {...} sequences found in a URI template.

See Also:
ValueRenderer

Constructor Summary
TemplateExpression(ExpressionType expressionType, List<VariableSpec> variableSpecs)
           
 
Method Summary
 boolean equals(Object obj)
           
 String expand(VariableMap vars)
          Compute an expanded string given a map of variables
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemplateExpression

public TemplateExpression(ExpressionType expressionType,
                          List<VariableSpec> variableSpecs)
Method Detail

expand

public String expand(VariableMap vars)
              throws URITemplateException
Description copied from interface: URITemplateExpression
Compute an expanded string given a map of variables

Specified by:
expand in interface URITemplateExpression
Parameters:
vars - the variables (names and values)
Returns:
the expanded string
Throws:
URITemplateException - incompatible variable/expansion pair

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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