com.github.fge.uritemplate.vars.specs
Class PrefixVariable
java.lang.Object
com.github.fge.uritemplate.vars.specs.VariableSpec
com.github.fge.uritemplate.vars.specs.PrefixVariable
public final class PrefixVariable
- extends VariableSpec
A varspec with a prefix modifier (for instance, foo:3
in {foo:3}
Fields inherited from class com.github.fge.uritemplate.vars.specs.VariableSpec |
name |
PrefixVariable
public PrefixVariable(String name,
int length)
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