ImageLayout2 extends ImageLayout { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (!ImageLayout.class.isAssignableFrom(obj.getClass())) { return false; } ImageLayout other = (ImageLayout) obj; if (getValidMask() != other.getValidMask()) { return false; } if (getWidth(null) != other.getWidth(null)) { return false; } if (getHeight(null) != other.getHeight(null)) { return false; } if (getMinX(null) != other.getMinX(null)) { return false; } if (getMinY(null) != other.getMinY(null)) { return false; } if (getTileWidth(null) != other.getTileWidth(null)) { return false; } if (getTileHeight(null) != other.getTileHeight(null)) { return false; } if (getTileGridXOffset(null) != other.getTileGridXOffset(null)) { return false; } if (getTileGridYOffset(null) != other.getTileGridYOffset(null)) { return false; } SampleModel sm = getSampleModel(null); if (sm == null) { if (other.getSampleModel(null) != null) { return false; } } else { if (!sm.equals(other.getSampleModel(null))) { return false; } } ColorModel cm = getColorModel(null); if (cm == null) { if (other.getColorModel(null) != null) { return false; } } else { if (!cm.equals(other.getColorModel(null))) { return false; } } return true; } ImageLayout2();  ImageLayout2(
            final int minX, 
            final int minY, 
            final int width, 
            final int height, 
            final int tileGridXOffset,
            final int tileGridYOffset, 
            final int tileWidth, 
            final int tileHeight, 
            final SampleModel sampleModel,
            final ColorModel colorModel);  ImageLayout2(
            final int tileGridXOffset, 
            final int tileGridYOffset, 
            final int tileWidth, 
            final int tileHeight,
            final SampleModel sampleModel, 
            final ColorModel colorModel);  ImageLayout2(
            final int minX, 
            final int minY, 
            final int width, 
            final int height);  ImageLayout2(RenderedImage im); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test public void testEquals() { ImageLayout2 il1 = new ImageLayout2(1, 2, 3, 4, 5, 6, 7, 8, null, null); ImageLayout2 il2 = new ImageLayout2(1, 2, 3, 4, 5, 6, 7, 8, null, null); assertTrue(il1.equals(il2)); }
@Test public void testNotEquals() { ImageLayout2 il1 = new ImageLayout2(1, 2, 3, 4, 5, 6, 7, 8, null, null); int[] z = { 1, 2, 3, 4, 5, 6, 7, 8 }; for (int i = 0; i < 8; i++) { int oldz = z[i]; z[i] = 99; ImageLayout2 il2 = new ImageLayout2( z[0], z[1], z[2], z[3], z[4], z[5], z[6], z[7], null, null); assertFalse(il1.equals(il2)); z[i] = oldz; } }