|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wicket.util.string.interpolator.VariableInterpolator
public abstract class VariableInterpolator
Base class for variable interpolators. An interpolator substitutes values into a string. So a variable interpolator substitutes the values of one or more variables into a string.
The String to interpolate (substitute in) is passed to the VariableInterpolator constructor. Variables are denoted in this string by the syntax ${variableName}. A subclass provides an implementation for the abstract method getValue(String variableName). The toString() method then performs an interpolation by replacing each variable of the form ${variableName} with the value returned by getValue("variableName").
Field Summary | |
---|---|
protected java.lang.String |
string
The string to interpolate within |
Constructor Summary | |
---|---|
VariableInterpolator(java.lang.String string)
Constructor |
Method Summary | |
---|---|
protected abstract java.lang.String |
getValue(java.lang.String variableName)
Gets a value for a variable name during interpolation |
java.lang.String |
toString()
Interpolate using variables |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final java.lang.String string
Constructor Detail |
---|
public VariableInterpolator(java.lang.String string)
string
- String to interpolate with variable valuesMethod Detail |
---|
protected abstract java.lang.String getValue(java.lang.String variableName)
variableName
- The variable
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |