Class TileRef

java.lang.Object
org.eclipse.nebula.widgets.geomap.internal.TileRef

public final class TileRef
extends java.lang.Object
A single tile in the map. A tile has an x and y coordinate, but both only make sense in the context of a given zoom level. The tile's zoom level is given by z.

For caching the tiles support some equals and hashCode behavior that makes them suitable as key-objects in java-util collections.

  • Field Summary

    Fields 
    Modifier and Type Field Description
    int x
    The x coordinate of this TileRef
    int y
    The y coordinate of this TileRef
    int z
    The z coordinate, i.e. zoom level, of this TileRef
  • Constructor Summary

    Constructors 
    Constructor Description
    TileRef​(int x, int y, int z)
    Initializes this TileRef with x, y and z coordinates
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(java.lang.Object obj)  
    int hashCode()  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • x

      public final int x
      The x coordinate of this TileRef
    • y

      public final int y
      The y coordinate of this TileRef
    • z

      public final int z
      The z coordinate, i.e. zoom level, of this TileRef
  • Constructor Details

    • TileRef

      public TileRef​(int x, int y, int z)
      Initializes this TileRef with x, y and z coordinates
      Parameters:
      x - the x coordinate
      y - the y coordinate
      z - the z coordinate
  • Method Details

    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
    • equals

      public boolean equals​(java.lang.Object obj)
      Overrides:
      equals in class java.lang.Object