Package gov.nasa.worldwind.util
Class TileKey
- java.lang.Object
-
- gov.nasa.worldwind.util.TileKey
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(TileKey key)
Compare two tile keys.boolean
equals(java.lang.Object o)
java.lang.String
getCacheName()
int
getColumn()
int
getLevelNumber()
int
getRow()
int
hashCode()
java.lang.String
toString()
-
-
-
Constructor Detail
-
TileKey
public TileKey(int level, int row, int col, java.lang.String cacheName)
- Parameters:
level
- Tile level.row
- Tile row.col
- Tile col.cacheName
- Cache name.- Throws:
java.lang.IllegalArgumentException
- iflevel
,row
orcolumn
is negative or ifcacheName
is null or empty
-
TileKey
public TileKey(Angle latitude, Angle longitude, LevelSet levelSet, int levelNumber)
- Parameters:
latitude
- Tile latitude.longitude
- Tile longitude.levelSet
- The level set.levelNumber
- Tile level number.- Throws:
java.lang.IllegalArgumentException
- if any parameter is null
-
TileKey
public TileKey(Tile tile)
- Parameters:
tile
- The source tile.- Throws:
java.lang.IllegalArgumentException
- iftile
is null
-
-
Method Detail
-
getLevelNumber
public int getLevelNumber()
-
getRow
public int getRow()
-
getColumn
public int getColumn()
-
getCacheName
public java.lang.String getCacheName()
-
compareTo
public final int compareTo(TileKey key)
Compare two tile keys. Keys are ordered based on level, row, and column (in that order).- Specified by:
compareTo
in interfacejava.lang.Comparable<TileKey>
- Parameters:
key
- Key to compare with.- Returns:
- 0 if the keys are equal. 1 if this key >
key
. -1 if this key <key
. - Throws:
java.lang.IllegalArgumentException
- ifkey
is null
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-