@Test public void jobTest() { Job job = createJob(new Tile(0, 1, (byte) 2, TILE_SIZE)); Assert.assertEquals(new Tile(0, 1, (byte) 2, TILE_SIZE), job.tile); verifyInvalidConstructor(null); }
public Job(Tile tile, boolean hasAlpha) { if (tile == null) { throw new IllegalArgumentException("tile must not be null"); } this.tile = tile; this.hasAlpha = hasAlpha; this.key = composeKey(this.tile.zoomLevel, this.tile.tileX, this.tile.tileY); }
Job { public Job(Tile tile, boolean hasAlpha) { if (tile == null) { throw new IllegalArgumentException("tile must not be null"); } this.tile = tile; this.hasAlpha = hasAlpha; this.key = composeKey(this.tile.zoomLevel, this.tile.tileX, this.tile.tileY); } }
Job { public Job(Tile tile, boolean hasAlpha) { if (tile == null) { throw new IllegalArgumentException("tile must not be null"); } this.tile = tile; this.hasAlpha = hasAlpha; this.key = composeKey(this.tile.zoomLevel, this.tile.tileX, this.tile.tileY); } Job(Tile tile, boolean hasAlpha); }
Job { public Job(Tile tile, boolean hasAlpha) { if (tile == null) { throw new IllegalArgumentException("tile must not be null"); } this.tile = tile; this.hasAlpha = hasAlpha; this.key = composeKey(this.tile.zoomLevel, this.tile.tileX, this.tile.tileY); } Job(Tile tile, boolean hasAlpha); static String composeKey(String z, String x, String y); @Override boolean equals(Object obj); String getKey(); @Override int hashCode(); }
Job { public Job(Tile tile, boolean hasAlpha) { if (tile == null) { throw new IllegalArgumentException("tile must not be null"); } this.tile = tile; this.hasAlpha = hasAlpha; this.key = composeKey(this.tile.zoomLevel, this.tile.tileX, this.tile.tileY); } Job(Tile tile, boolean hasAlpha); static String composeKey(String z, String x, String y); @Override boolean equals(Object obj); String getKey(); @Override int hashCode(); final boolean hasAlpha; final Tile tile; }