public ImageData merge(Color backgroundColour, ImageData foregroundData) { ColourMerge merge = new ColourMerge(); merge.backgroundColour = backgroundColour; merge.foregroundData = foregroundData;  ImageData imageData = (ImageData) cache.get(merge); if (imageData == null) cache.put(merge, imageData = merge(merge));  return imageData;
public ImageData merge(ImageData backgroundData, Point location, ImageData foregroundData) { return merge(backgroundData, location.x, location.y, foregroundData);
  public ImageData merge(Color backgroundColour, ImageData foregroundData) {        ColourMerge merge = new ColourMerge();    merge.backgroundColour = backgroundColour;    merge.foregroundData = foregroundData;        ImageData imageData = (ImageData) cache.get(merge);            if (imageData == null)      cache.put(merge, imageData = merge(merge));        return imageData;  }  