|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.util.string.interpolator.VariableInterpolator
org.apache.wicket.util.string.interpolator.MapVariableInterpolator
public class MapVariableInterpolator
Interpolates variables into a String from a Map.
| Field Summary |
|---|
| Fields inherited from class org.apache.wicket.util.string.interpolator.VariableInterpolator |
|---|
string |
| Constructor Summary | |
|---|---|
MapVariableInterpolator(String string,
Map<?,?> variables)
Constructor. |
|
MapVariableInterpolator(String string,
Map<?,?> variables,
boolean exceptionOnNullVarValue)
Constructor. |
|
| Method Summary | |
|---|---|
protected String |
getValue(String variableName)
Retrieves a value for a variable name during interpolation. |
static String |
interpolate(String string,
Map<?,?> variables)
Interpolates a String with the arguments defined in the given Map. |
void |
setVariables(Map<?,?> variables)
Sets the Map of variables. |
| Methods inherited from class org.apache.wicket.util.string.interpolator.VariableInterpolator |
|---|
toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MapVariableInterpolator(String string,
Map<?,?> variables)
string - a String to interpolate intovariables - the variables to substitute
public MapVariableInterpolator(String string,
Map<?,?> variables,
boolean exceptionOnNullVarValue)
string - a String to interpolate intovariables - the variables to substituteexceptionOnNullVarValue - if true an IllegalStateException will be thrown if
getValue(String) returns null, otherwise the
${varname} string will be left in the String so that
multiple interpolators can be chained| Method Detail |
|---|
public final void setVariables(Map<?,?> variables)
Map of variables.
variables - the Map of variablesprotected String getValue(String variableName)
getValue in class VariableInterpolatorvariableName - the variable name
public static String interpolate(String string,
Map<?,?> variables)
String with the arguments defined in the given Map.
string - a String to interpolate intovariables - the variables to substitute
String
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||