Package gov.nasa.worldwind.util
Class LevelSet
- java.lang.Object
-
- gov.nasa.worldwind.avlist.AVListImpl
-
- gov.nasa.worldwind.WWObjectImpl
-
- gov.nasa.worldwind.util.LevelSet
-
- All Implemented Interfaces:
AVList
,MessageListener
,WWObject
,java.beans.PropertyChangeListener
,java.util.EventListener
public class LevelSet extends WWObjectImpl
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LevelSet.SectorResolution
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Sector
computeSectorForKey(TileKey key)
Tile
createTile(TileKey key)
Level
getFirstLevel()
Level
getLastLevel()
Level
getLastLevel(Angle latitude, Angle longitude)
Level
getLastLevel(Sector sector)
Level
getLevel(int levelNumber)
java.util.ArrayList<Level>
getLevels()
LatLon
getLevelZeroTileDelta()
Level
getNextToLastLevel()
int
getNumLevels()
Sector
getSector()
LevelSet.SectorResolution[]
getSectorLevelLimits()
LatLon
getTileOrigin()
java.lang.Object
getValue(java.lang.String key)
Returns the value for a specified key.boolean
isFinalLevel(int levelNum)
boolean
isLevelEmpty(int levelNumber)
boolean
isResourceAbsent(Tile tile)
Indicates whether a tile has been marked as absent.boolean
isResourceAbsent(TileKey tileKey)
Indicates whether a tile has been marked as absent.void
markResourceAbsent(Tile tile)
Instructs the level set that a tile is likely to be absent.void
setExpiryTime(long expiryTime)
java.lang.Object
setValue(java.lang.String key, java.lang.Object value)
Adds a key/value pair to the list.void
unmarkResourceAbsent(Tile tile)
Removes the absent-tile mark associated with a tile, if one is associatied.-
Methods inherited from class gov.nasa.worldwind.WWObjectImpl
onMessage, propertyChange
-
Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, getStringValue, getStringValue, getStringValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValues
-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface gov.nasa.worldwind.avlist.AVList
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValues
-
-
-
-
Method Detail
-
setValue
public java.lang.Object setValue(java.lang.String key, java.lang.Object value)
Description copied from interface:AVList
Adds a key/value pair to the list. Replaces an existing key/value pair if the list already contains the key.- Specified by:
setValue
in interfaceAVList
- Overrides:
setValue
in classAVListImpl
- Parameters:
key
- the attribute name. May not benull
.value
- the attribute value. May benull
, in which case any existing value for the key is removed from the collection.- Returns:
- previous value associated with specified key, or null if there was no mapping for key. A null return can also indicate that the map previously associated null with the specified key, if the implementation supports null values.
-
getValue
public java.lang.Object getValue(java.lang.String key)
Description copied from interface:AVList
Returns the value for a specified key.- Specified by:
getValue
in interfaceAVList
- Overrides:
getValue
in classAVListImpl
- Parameters:
key
- the attribute name. May not benull
.- Returns:
- the attribute value if one exists in the collection, otherwise
null
.
-
getSector
public final Sector getSector()
-
getLevelZeroTileDelta
public final LatLon getLevelZeroTileDelta()
-
getTileOrigin
public final LatLon getTileOrigin()
-
getSectorLevelLimits
public final LevelSet.SectorResolution[] getSectorLevelLimits()
-
getLevels
public final java.util.ArrayList<Level> getLevels()
-
getLevel
public final Level getLevel(int levelNumber)
-
getNumLevels
public final int getNumLevels()
-
getFirstLevel
public final Level getFirstLevel()
-
getLastLevel
public final Level getLastLevel()
-
getNextToLastLevel
public final Level getNextToLastLevel()
-
isFinalLevel
public final boolean isFinalLevel(int levelNum)
-
isLevelEmpty
public final boolean isLevelEmpty(int levelNumber)
-
markResourceAbsent
public final void markResourceAbsent(Tile tile)
Instructs the level set that a tile is likely to be absent.- Parameters:
tile
- The tile to mark as having an absent resource.- Throws:
java.lang.IllegalArgumentException
- iftile
is null
-
isResourceAbsent
public final boolean isResourceAbsent(TileKey tileKey)
Indicates whether a tile has been marked as absent.- Parameters:
tileKey
- The key of the tile in question.- Returns:
true
if the tile is marked absent, otherwisefalse
.- Throws:
java.lang.IllegalArgumentException
- iftile
is null
-
isResourceAbsent
public final boolean isResourceAbsent(Tile tile)
Indicates whether a tile has been marked as absent.- Parameters:
tile
- The tile in question.- Returns:
true
if the tile is marked absent, otherwisefalse
.- Throws:
java.lang.IllegalArgumentException
- iftile
is null
-
unmarkResourceAbsent
public final void unmarkResourceAbsent(Tile tile)
Removes the absent-tile mark associated with a tile, if one is associatied.- Parameters:
tile
- The tile to unmark.- Throws:
java.lang.IllegalArgumentException
- iftile
is null
-
setExpiryTime
public void setExpiryTime(long expiryTime)
-
-