@Test public void equalsTest() { File mapFile = new File(MAP_FILE); XmlRenderTheme xmlRenderTheme = InternalRenderTheme.OSMARENDER; Tile tile = new Tile(0, 0, (byte) 0); DisplayModel displayModel = new DisplayModel(); RendererJob rendererJob1 = new RendererJob(tile, mapFile, xmlRenderTheme, displayModel, 1, false); RendererJob rendererJob2 = new RendererJob(tile, mapFile, xmlRenderTheme, displayModel, 1, false); RendererJob rendererJob3 = new RendererJob(tile, mapFile, xmlRenderTheme, displayModel, 2, false); TestUtils.equalsTest(rendererJob1, rendererJob2); Assert.assertNotEquals(rendererJob1, rendererJob3); Assert.assertNotEquals(rendererJob3, rendererJob1); Assert.assertNotEquals(rendererJob1, new Object()); TileSource tileSource = OpenStreetMapMapnik.INSTANCE; Assert.assertNotEquals(rendererJob1, new DownloadJob(tile, 1, tileSource)); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } else if (!super.equals(obj)) { return false; } else if (!(obj instanceof RendererJob)) { return false; } RendererJob other = (RendererJob) obj; if (!this.mapFile.equals(other.mapFile)) { return false; } else if (Float.floatToIntBits(this.textScale) != Float.floatToIntBits(other.textScale)) { return false; } else if (!this.xmlRenderTheme.equals(other.xmlRenderTheme)) { return false; } else if (!this.displayModel.equals(other.displayModel)) { return false; } return true; }
RendererJob extends Job { @Override public boolean equals(Object obj) { if (this == obj) { return true; } else if (!super.equals(obj)) { return false; } else if (!(obj instanceof RendererJob)) { return false; } RendererJob other = (RendererJob) obj; if (!this.mapFile.equals(other.mapFile)) { return false; } else if (Float.floatToIntBits(this.textScale) != Float.floatToIntBits(other.textScale)) { return false; } else if (!this.xmlRenderTheme.equals(other.xmlRenderTheme)) { return false; } else if (!this.displayModel.equals(other.displayModel)) { return false; } return true; } }
RendererJob extends Job { @Override public boolean equals(Object obj) { if (this == obj) { return true; } else if (!super.equals(obj)) { return false; } else if (!(obj instanceof RendererJob)) { return false; } RendererJob other = (RendererJob) obj; if (!this.mapFile.equals(other.mapFile)) { return false; } else if (Float.floatToIntBits(this.textScale) != Float.floatToIntBits(other.textScale)) { return false; } else if (!this.xmlRenderTheme.equals(other.xmlRenderTheme)) { return false; } else if (!this.displayModel.equals(other.displayModel)) { return false; } return true; } RendererJob(Tile tile, File mapFile, XmlRenderTheme xmlRenderTheme, DisplayModel displayModel,
			float textScale, boolean isTransparent); }
RendererJob extends Job { @Override public boolean equals(Object obj) { if (this == obj) { return true; } else if (!super.equals(obj)) { return false; } else if (!(obj instanceof RendererJob)) { return false; } RendererJob other = (RendererJob) obj; if (!this.mapFile.equals(other.mapFile)) { return false; } else if (Float.floatToIntBits(this.textScale) != Float.floatToIntBits(other.textScale)) { return false; } else if (!this.xmlRenderTheme.equals(other.xmlRenderTheme)) { return false; } else if (!this.displayModel.equals(other.displayModel)) { return false; } return true; } RendererJob(Tile tile, File mapFile, XmlRenderTheme xmlRenderTheme, DisplayModel displayModel,
			float textScale, boolean isTransparent); @Override boolean equals(Object obj); @Override int hashCode(); }
RendererJob extends Job { @Override public boolean equals(Object obj) { if (this == obj) { return true; } else if (!super.equals(obj)) { return false; } else if (!(obj instanceof RendererJob)) { return false; } RendererJob other = (RendererJob) obj; if (!this.mapFile.equals(other.mapFile)) { return false; } else if (Float.floatToIntBits(this.textScale) != Float.floatToIntBits(other.textScale)) { return false; } else if (!this.xmlRenderTheme.equals(other.xmlRenderTheme)) { return false; } else if (!this.displayModel.equals(other.displayModel)) { return false; } return true; } RendererJob(Tile tile, File mapFile, XmlRenderTheme xmlRenderTheme, DisplayModel displayModel,
			float textScale, boolean isTransparent); @Override boolean equals(Object obj); @Override int hashCode(); final DisplayModel displayModel; final File mapFile; final float textScale; final XmlRenderTheme xmlRenderTheme; }