Package com.massifmaps.datasources
Class TileDownloadInfo
java.lang.Object
com.massifmaps.datasources.TileDownloadInfo
What a tile download reports, as one object.
A listener has four callbacks with four different arguments; a facade event carries a payload,
and one payload class over the four is what lets a binding subscribe to "the download" rather
than to each of them. Only the fields the event in question fills are meaningful - `progress`
on download.progress, `tile` on download.failed.
A listener has four callbacks with four different arguments; a facade event carries a payload,
and one payload class over the four is what lets a binding subscribe to "the download" rather
than to each of them. Only the fields the event in question fills are meaningful - `progress`
on download.progress, `tile` on download.failed.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if this object is equal to the specified object.floatReturns the progress of the download.getTile()Returns the tile the event concerns, which is only meaningful for a failure.intReturns the number of tiles the download will fetch.inthashCode()Returns the hash value of this object.toString()Creates a string representation of this object, useful for logging.
-
Method Details
-
equals
Checks if this object is equal to the specified object. -
hashCode
public int hashCode()Returns the hash value of this object. -
getTileCount
public int getTileCount()Returns the number of tiles the download will fetch.- Returns:
- The tile count, or -1 when it is not known yet.
-
getProgress
public float getProgress()Returns the progress of the download.- Returns:
- The progress, from 0 to 100.
-
getTile
Returns the tile the event concerns, which is only meaningful for a failure.- Returns:
- The tile.
-
toString
Creates a string representation of this object, useful for logging.
-