com.github.fge.uritemplate.vars.specs
Class SimpleVariable

java.lang.Object
  extended by com.github.fge.uritemplate.vars.specs.VariableSpec
      extended by com.github.fge.uritemplate.vars.specs.SimpleVariable

public final class SimpleVariable
extends VariableSpec

A varspec with no modifier (for instance, foo in {foo}


Field Summary
 
Fields inherited from class com.github.fge.uritemplate.vars.specs.VariableSpec
name
 
Constructor Summary
SimpleVariable(String name)
           
 
Method Summary
 boolean equals(Object obj)
           
 int getPrefixLength()
          Return the prefix length for this varspec
 int hashCode()
           
 boolean isExploded()
          Tell whether this varspec has an explode modifier
 String toString()
           
 
Methods inherited from class com.github.fge.uritemplate.vars.specs.VariableSpec
getName, getType
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleVariable

public SimpleVariable(String name)
Method Detail

isExploded

public boolean isExploded()
Description copied from class: VariableSpec
Tell whether this varspec has an explode modifier

Specified by:
isExploded in class VariableSpec
Returns:
true if an explode modifier is present

getPrefixLength

public int getPrefixLength()
Description copied from class: VariableSpec
Return the prefix length for this varspec

Returns -1 if no prefix length is specified. Recall: valid values are integers between 0 and 10000.

Specified by:
getPrefixLength in class VariableSpec
Returns:
the prefix length, or -1 if no prefix modidifer

hashCode

public int hashCode()
Specified by:
hashCode in class VariableSpec

equals

public boolean equals(Object obj)
Specified by:
equals in class VariableSpec

toString

public String toString()
Specified by:
toString in class VariableSpec