com.github.fge.uritemplate.render
Class StringRenderer

java.lang.Object
  extended by com.github.fge.uritemplate.render.ValueRenderer
      extended by com.github.fge.uritemplate.render.StringRenderer

public final class StringRenderer
extends ValueRenderer

String value renderer

Rendering of a string value is the only event where the returned list cannot be empty. Concurrently, it will always have a single element.


Field Summary
 
Fields inherited from class com.github.fge.uritemplate.render.ValueRenderer
ifEmpty, named
 
Constructor Summary
StringRenderer(ExpressionType type)
           
 
Method Summary
 List<String> render(VariableSpec varspec, VariableValue value)
          Render a value given a varspec and value
 
Methods inherited from class com.github.fge.uritemplate.render.ValueRenderer
pctEncode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringRenderer

public StringRenderer(ExpressionType type)
Method Detail

render

public List<String> render(VariableSpec varspec,
                           VariableValue value)
                    throws URITemplateException
Description copied from class: ValueRenderer
Render a value given a varspec and value

Specified by:
render in class ValueRenderer
Parameters:
varspec - the varspec
value - the matching variable value
Returns:
a list of rendered strings
Throws:
URITemplateException - illegal expansion