Class MessageFormatter.NamedArgumentBinding

  • Enclosing class:
    MessageFormatter

    public static class MessageFormatter.NamedArgumentBinding
    extends Object
    Named argument binding instance
    • Field Detail

      • name

        public final String name
        The name of the argument
      • value

        public final Object value
        the value that will be inserted where ever an argument with name matching name is placed
    • Constructor Detail

      • NamedArgumentBinding

        public NamedArgumentBinding​(String name,
                                    Object value)
        Create a new Named argument binding
             bind("Hello {:firstName}",
                  new NamedArgumentBinding("firstName", "Peter"))
         
        will return "Hello Peter"
        Parameters:
        name - The name of the argument
        value - the value that will be inserted where ever an argument with name matching name is placed