public class ParameterResolver extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
resolve(String message,
Object... arguments)
Resolve all the placeholders
{} in the message to the given arguments |
public static String resolve(String message, Object... arguments) throws InvalidParameterException
{} in the message to the given arguments
resolve("Hi {}", "bob").equals("Hi bob");
resolve("Hi {} and {}, "bob", "alice").equals("Hi bob and alice");
message - The message with placeholdersarguments - The arguments to put in the placeholdersInvalidParameterException - If there is not a placeholder for every argumentInvalidParameterException - If there is not an argument for every placeholderInvalidParameterException - IfCopyright © 2009–2016 RedEngine Ltd. All rights reserved.