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 intcompareTo(TileKey key)Compare two tile keys.booleanequals(java.lang.Object o)java.lang.StringgetCacheName()intgetColumn()intgetLevelNumber()intgetRow()inthashCode()java.lang.StringtoString()
-
-
-
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,roworcolumnis negative or ifcacheNameis 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- iftileis 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:
compareToin 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- ifkeyis null
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-