private void cleanGrid() { WVirtualImage.Rect cleanNb = this.neighbourhood( this.currentX_, this.currentY_, this.viewPortWidth_ * 3, this.viewPortHeight_ * 3); long i1 = cleanNb.x1 / this.gridImageSize_; long j1 = cleanNb.y1 / this.gridImageSize_; long i2 = cleanNb.x2 / this.gridImageSize_ + 1; long j2 = cleanNb.y2 / this.gridImageSize_ + 1; for (Iterator<Map.Entry<Long, WImage>> it_it = this.grid_.entrySet().iterator(); it_it.hasNext(); ) { Map.Entry<Long, WImage> it = it_it.next(); WVirtualImage.Coordinate coordinate = new WVirtualImage.Coordinate(); this.decodeKey(it.getKey(), coordinate); if (coordinate.i < i1 || coordinate.i > i2 || coordinate.j < j1 || coordinate.j > j2) {; if (it.getValue() != null) it.getValue().remove(); it_it.remove(); } else { } } }