public void addMapping(String oldImg,int oldIndex,String newImg,int newIndex){
  newTilesets.add(newImg);
  HashMap<Integer,TileInfo> mapping=mappings.get(oldImg);
  if (mapping == null) {
    mapping=new HashMap<Integer,TileInfo>();
    mappings.put(oldImg,mapping);
  }
  mapping.put(oldIndex,new TileInfo(newImg,newIndex));
}

public void addMapping ( String oldImg , int oldIndex , String newImg , int newIndex ) { newTilesets . add ( newImg ) ; HashMap < Integer , TileInfo > mapping = mappings . get ( oldImg ) ; if ( mapping == null ) { mapping = new HashMap < Integer , TileInfo > ( ) ; mappings . put ( oldImg , mapping ) ; } mapping . put ( oldIndex , new TileInfo ( newImg , newIndex ) ) ; }
add a new translation mapping .
