public void add(String name, MessageArg arg) {
    args.add(arg);
    if (map == null) {
      map = new HashMap<>();
    }
    map.put(name, arg);
  }
public void add ( String name , MessageArg arg ) { args . add ( arg ) ; if ( map == null ) { map = new HashMap < > ( ) ; } map . put ( name , arg ) ; }
Add a named argument. Also accessible by index.