Class TileDownloadInfo

java.lang.Object
com.massifmaps.datasources.TileDownloadInfo

public class TileDownloadInfo extends Object
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.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Checks if this object is equal to the specified object.
    float
    Returns the progress of the download.
    Returns the tile the event concerns, which is only meaningful for a failure.
    int
    Returns the number of tiles the download will fetch.
    int
    Returns the hash value of this object.
    Creates a string representation of this object, useful for logging.

    Methods inherited from class java.lang.Object

    clone, getClass, notify, notifyAll, wait, wait, wait
  • Method Details

    • equals

      public boolean equals(Object obj)
      Checks if this object is equal to the specified object.
      Overrides:
      equals in class Object
      Parameters:
      obj - The reference object.
      Returns:
      True when objects are equal, false otherwise.
    • hashCode

      public int hashCode()
      Returns the hash value of this object.
      Overrides:
      hashCode in class Object
      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

      public MapTile getTile()
      Returns the tile the event concerns, which is only meaningful for a failure.
      Returns:
      The tile.
    • toString

      public String toString()
      Creates a string representation of this object, useful for logging.
      Overrides:
      toString in class Object
      Returns:
      The string representation of this object.