Rabbit Escape  2017-01-14_18:33:47_+0000__(tag:_v0.10.1)
Static Public Member Functions | List of all members
rabbitescape.engine.util.NamedFieldFormatter Class Reference

Static Public Member Functions

static String format (String format, Map< String, Object > params)
 

Member Function Documentation

static String rabbitescape.engine.util.NamedFieldFormatter.format ( String  format,
Map< String, Object >  params 
)
static

Format a string containing named substitution parameters by substituting in values from params.

For example:

Map<String, Object> params = new HashMap<String, Object>(); params.put( "thing", "life" ); params.put( "answer", 42 ); String x = format( "The meaning of ${thing} is ${answer}.", params ); System.out.println( x );

Will print "The meaning of life is 42."

Parameters
formatthe format string containing parameters surrounded by ${}
paramsa map of parameter names to their values
Returns
the format string with parameters substituted wherever their names (surrounded by ${}) are found.

The documentation for this class was generated from the following file: