PixelGeoCoding extends AbstractGeoCoding implements BasicPixelGeoCoding { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } PixelGeoCoding that = (PixelGeoCoding) o; if (searchRadius != that.searchRadius) { return false; } if (!latBand.equals(that.latBand)) { return false; } if (!lonBand.equals(that.lonBand)) { return false; } if (validMaskExpression != null ? !validMaskExpression.equals( that.validMaskExpression) : that.validMaskExpression != null) { return false; } return true; } PixelGeoCoding(final Band latBand, final Band lonBand, final String validMask, final int searchRadius);  PixelGeoCoding(final Band latBand, final Band lonBand, final String validMask, final int searchRadius,
                          ProgressMonitor pm); static long getRequiredMemory(Product product, boolean usesValidMask); @Override Band getLatBand(); @Override Band getLonBand(); @Override String getValidMask(); @Override GeoCoding getPixelPosEstimator(); @Override int getSearchRadius(); @Override boolean isCrossingMeridianAt180(); @Override boolean canGetPixelPos(); @Override boolean canGetGeoPos(); @Override PixelPos getPixelPos(final GeoPos geoPos, PixelPos pixelPos); void getPixelPosUsingEstimator(final GeoPos geoPos, PixelPos pixelPos); void getPixelPosUsingQuadTreeSearch(final GeoPos geoPos, PixelPos pixelPos); @Override GeoPos getGeoPos(final PixelPos pixelPos, GeoPos geoPos); @Override boolean equals(Object o); @Override int hashCode(); @Override synchronized void dispose(); @Override boolean transferGeoCoding(final Scene srcScene, final Scene destScene, final ProductSubsetDef subsetDef); @Override Datum getDatum();  }
@Test public void testEquals() throws Exception { Product product = createProduct(); GeoCoding geoCoding1 = new PixelGeoCoding(product.getBand("latBand"), product.getBand("lonBand"), null, 5); GeoCoding geoCoding2 = new PixelGeoCoding(product.getBand("latBand"), product.getBand("lonBand"), null, 5); GeoCoding geoCoding3 = new PixelGeoCoding(product.getBand("latBand"), product.getBand("lonBand"), null, 7); product.setGeoCoding(geoCoding1); assertEquals(geoCoding1, geoCoding2); assertFalse(geoCoding1.equals(geoCoding3)); }