Class SingleTile
java.lang.Object
org.deltava.util.tile.AbstractTile
org.deltava.util.tile.SingleTile
- All Implemented Interfaces:
Serializable
,Comparable<Tile>
,RasterTile
,Tile
A single Tile.
- Since:
- 5.0
- Version:
- 11.3
- Author:
- Luke
- See Also:
-
Field Summary
FieldsFields inherited from class org.deltava.util.tile.AbstractTile
_addr
-
Constructor Summary
ConstructorsConstructorDescriptionSingleTile
(TileAddress addr) Creates a new blank Tile.SingleTile
(TileAddress addr, BufferedImage img) Creates a new Tile. -
Method Summary
Modifier and TypeMethodDescriptiongetImage()
Returns the rendered image.boolean
isEmpty()
Returns whether this Tile has any data.boolean
isEmpty
(TileAddress addr) Returns whether a child of this Tile would be empty.void
setImage
(BufferedImage img) Sets the tile image.Methods inherited from class org.deltava.util.tile.AbstractTile
compareTo, getAddress, getName, hashCode
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface org.deltava.util.tile.Tile
getAddress, getName
-
Field Details
-
_img
-
-
Constructor Details
-
SingleTile
-
SingleTile
Creates a new Tile.- Parameters:
addr
- the addressimg
- the BufferedImage
-
-
Method Details
-
setImage
Description copied from interface:Tile
Sets the tile image. -
getImage
Description copied from interface:RasterTile
Returns the rendered image.- Specified by:
getImage
in interfaceRasterTile
- Returns:
- the image
-
isEmpty
public boolean isEmpty()Returns whether this Tile has any data.- Returns:
- TRUE if the Tile has no data, otherwise FALSE
-
isEmpty
Returns whether a child of this Tile would be empty. This has the significant performance advantage since less data needs to be processed than if one generated the Tile and called isEmpty on it.- Parameters:
addr
- the child Address- Returns:
- FALSE if the Tile would be empty
- Throws:
IllegalArgumentException
- if addr's parent is not this TileNullPointerException
- if addr is null
-