if (images.get(key) == image) {
Image[] imgs = (Image[])images.get(key); if (imgs[0] == image) {
    public Object queryImageId(Image image) {        String hash = checksumImage(image);        image = (Image)imageCache.get(hash);        if (image != null) {            Iterator itr = images.keySet().iterator();            while (itr.hasNext()) {                Object key = itr.next();                if (images.get(key) == image) {                    //System.out.println("Success: " + key);                    return key;                }            }        }        return Integer.toString(-1);    }