wicket.util.string.interpolator
Class MapVariableInterpolator

java.lang.Object
  extended by wicket.util.string.interpolator.VariableInterpolator
      extended by wicket.util.string.interpolator.MapVariableInterpolator
Direct Known Subclasses:
SystemVariableInterpolator

public class MapVariableInterpolator
extends VariableInterpolator

Interpolates variables into a string from a Map.

Author:
Jonathan Locke

Field Summary
 
Fields inherited from class wicket.util.string.interpolator.VariableInterpolator
string
 
Constructor Summary
MapVariableInterpolator(java.lang.String string, java.util.Map variables)
          Constructor
 
Method Summary
protected  java.lang.String getValue(java.lang.String variableName)
          Gets a value for a variable name during interpolation
static java.lang.String interpolate(java.lang.String string, java.util.Map variables)
          Interpolate the string with the arguments defined in a map
 void setVariables(java.util.Map variables)
          Accessor to set variables
 
Methods inherited from class 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

MapVariableInterpolator

public MapVariableInterpolator(java.lang.String string,
                               java.util.Map variables)
Constructor

Parameters:
string - The string to interpolate into
variables - The variables to substitute
Method Detail

setVariables

public final void setVariables(java.util.Map variables)
Accessor to set variables

Parameters:
variables - New value

getValue

protected final java.lang.String getValue(java.lang.String variableName)
Gets a value for a variable name during interpolation

Specified by:
getValue in class VariableInterpolator
Parameters:
variableName - The variable
Returns:
The value

interpolate

public static java.lang.String interpolate(java.lang.String string,
                                           java.util.Map variables)
Interpolate the string with the arguments defined in a map

Parameters:
string -
variables -
Returns:
interpolated string


Copyright © 2004-2007 Wicket developers. All Rights Reserved.