Package dk.cloudcreate.essentials.shared
Class MessageFormatter.NamedArgumentBinding
java.lang.Object
dk.cloudcreate.essentials.shared.MessageFormatter.NamedArgumentBinding
- Enclosing class:
- MessageFormatter
Named argument binding instance
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionNamedArgumentBinding(String name, Object value) Create a new Named argument binding -
Method Summary
-
Field Details
-
name
The name of the argument -
value
the value that will be inserted where ever an argument with name matchingnameis placed
-
-
Constructor Details
-
NamedArgumentBinding
Create a new Named argument binding
bind("Hello {:firstName}", new NamedArgumentBinding("firstName", "Peter"))will return"Hello Peter"- Parameters:
name- The name of the argumentvalue- the value that will be inserted where ever an argument with name matchingnameis placed
-
-
Method Details
-
arg
Create a named argument binding:bind("Hello {:firstName} {:lastName}.", arg("firstName", "Peter"), arg("lastName", "Hansen"))will return"Hello Peter Hansen."- Parameters:
name- The name of the argumentvalue- the value that will be inserted where ever an argument with name matchingnameis placed- Returns:
- a
MessageFormatter.NamedArgumentBindinginstance
-
toString
-