net.metanotion.urlmapper
Class URITemplate
java.lang.Object
net.metanotion.urlmapper.URITemplate
public final class URITemplate
- extends Object
URITemplate
public URITemplate(String template)
throws ParseException
- Throws:
ParseException
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
equals
public boolean equals(Object o)
- Overrides:
equals in class Object
toString
public String toString()
- Return the URITemplate represented by this object.
The value returned here should follow the identity law:
o.equals(new URITemplate(o.toString())) == true
- Overrides:
toString in class Object
- Returns:
- The string representing this URI Template.
toString
public String toString(Map<String,Object> params)
- Expand a URI Template into a URI(in string form).
- Parameters:
params - Key/value pairs to use for template Expansions.
- Returns:
- The URI(as a String) created by replacing the expansions with their values.
toURI
public URI toURI(Map<String,Object> params)
throws URISyntaxException
- Expand a URI Template into a URI
- Parameters:
params - Key/value pairs to use for template Expansions.
- Returns:
- The URI created by replacing the expansions with their values.
- Throws:
URISyntaxException