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 classLevelSet.SectorResolution
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SectorcomputeSectorForKey(TileKey key)TilecreateTile(TileKey key)LevelgetFirstLevel()LevelgetLastLevel()LevelgetLastLevel(Angle latitude, Angle longitude)LevelgetLastLevel(Sector sector)LevelgetLevel(int levelNumber)java.util.ArrayList<Level>getLevels()LatLongetLevelZeroTileDelta()LevelgetNextToLastLevel()intgetNumLevels()SectorgetSector()LevelSet.SectorResolution[]getSectorLevelLimits()LatLongetTileOrigin()java.lang.ObjectgetValue(java.lang.String key)Returns the value for a specified key.booleanisFinalLevel(int levelNum)booleanisLevelEmpty(int levelNumber)booleanisResourceAbsent(Tile tile)Indicates whether a tile has been marked as absent.booleanisResourceAbsent(TileKey tileKey)Indicates whether a tile has been marked as absent.voidmarkResourceAbsent(Tile tile)Instructs the level set that a tile is likely to be absent.voidsetExpiryTime(long expiryTime)java.lang.ObjectsetValue(java.lang.String key, java.lang.Object value)Adds a key/value pair to the list.voidunmarkResourceAbsent(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:AVListAdds a key/value pair to the list. Replaces an existing key/value pair if the list already contains the key.- Specified by:
setValuein interfaceAVList- Overrides:
setValuein 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:AVListReturns the value for a specified key.- Specified by:
getValuein interfaceAVList- Overrides:
getValuein 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- iftileis 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:
trueif the tile is marked absent, otherwisefalse.- Throws:
java.lang.IllegalArgumentException- iftileis null
-
isResourceAbsent
public final boolean isResourceAbsent(Tile tile)
Indicates whether a tile has been marked as absent.- Parameters:
tile- The tile in question.- Returns:
trueif the tile is marked absent, otherwisefalse.- Throws:
java.lang.IllegalArgumentException- iftileis 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- iftileis null
-
setExpiryTime
public void setExpiryTime(long expiryTime)
-
-