private static void add(String optionsKey,Map<String,List<Object>> map,String key,List<Object> values){
  if (key != null) {
    if (values == null) {
      add(map,optionsKey,key);
    }
 else {
      List<Object> old=map.get(key);
      if (old == null) {
        map.put(key,values);
      }
 else {
        old.addAll(values);
      }
    }
  }
}

private static void add ( String optionsKey , Map < String , List < Object > > map , String key , List < Object > values ) { if ( key != null ) { if ( values == null ) { add ( map , optionsKey , key ) ; } else { List < Object > old = map . get ( key ) ; if ( old == null ) { map . put ( key , values ) ; } else { old . addAll ( values ) ; } } } }
if key is null , the method does nothing . otherwise , if values is null , the key is an option name and therefore added to the map as an option . if values is not null , the key is an operand name and the values are added as operand values - - - merged with existing operand values if there are any .
