private void add(TreeMap<String,Object> map,String key,Object value){
  Vector<Object> v=getList(map,key);
  if (v == null) {
    v=new Vector<>();
synchronized (map) {
      map.put(key,v);
    }
  }
  if (!v.contains(value)) {
    v.add(value);
  }
}

private void add ( TreeMap < String , Object > map , String key , Object value ) { Vector < Object > v = getList ( map , key ) ; if ( v == null ) { v = new Vector < > ( ) ; synchronized ( map ) { map . put ( key , v ) ; } } if ( ! v . contains ( value ) ) { v . add ( value ) ; } }
generic method for adding into a map
