Package gov.nasa.worldwind.util
Class Level
- java.lang.Object
-
- gov.nasa.worldwind.avlist.AVListImpl
-
- gov.nasa.worldwind.util.Level
-
public class Level extends AVListImpl implements java.lang.Comparable<Level>
-
-
Field Summary
Fields Modifier and Type Field Description protected AbsentResourceListabsentTilesprotected booleanactiveprotected java.lang.StringcacheNameprotected java.lang.Stringdatasetprotected longexpiryTimeprotected java.lang.StringformatSuffixprotected java.lang.StringlevelNameprotected intlevelNumberprotected AVListparamsprotected java.lang.Stringpathprotected java.lang.Stringserviceprotected doubletexelSizeprotected LatLontileDeltaprotected inttileHeightprotected inttileWidthprotected TileUrlBuilderurlBuilder
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Level that)SectorcomputeSectorForPosition(Angle latitude, Angle longitude, LatLon tileOrigin)booleanequals(java.lang.Object o)AbsentResourceListgetAbsentTiles()java.lang.StringgetCacheName()java.lang.StringgetDataset()longgetExpiryTime()java.lang.StringgetFormatSuffix()java.lang.StringgetLevelName()intgetLevelNumber()AVListgetParams()java.lang.StringgetPath()java.lang.StringgetService()doublegetTexelSize()LatLongetTileDelta()intgetTileHeight()java.net.URLgetTileResourceURL(Tile tile, java.lang.String imageFormat)Returns the URL necessary to retrieve the specified tile.intgetTileWidth()java.lang.ObjectgetValue(java.lang.String key)Returns the value for a specified key.inthashCode()booleanisActive()booleanisEmpty()booleanisResourceAbsent(long tileNumber)voidmarkResourceAbsent(long tileNumber)voidsetActive(boolean active)voidsetExpiryTime(long expTime)java.lang.ObjectsetValue(java.lang.String key, java.lang.Object value)Adds a key/value pair to the list.java.lang.StringtoString()voidunmarkResourceAbsent(long tileNumber)protected java.lang.Stringvalidate(AVList params)Determines whether the constructor arguments are valid.-
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
-
-
-
-
Field Detail
-
params
protected AVList params
-
levelNumber
protected int levelNumber
-
levelName
protected java.lang.String levelName
-
tileDelta
protected LatLon tileDelta
-
tileWidth
protected int tileWidth
-
tileHeight
protected int tileHeight
-
cacheName
protected java.lang.String cacheName
-
service
protected java.lang.String service
-
dataset
protected java.lang.String dataset
-
formatSuffix
protected java.lang.String formatSuffix
-
texelSize
protected double texelSize
-
path
protected java.lang.String path
-
urlBuilder
protected TileUrlBuilder urlBuilder
-
expiryTime
protected long expiryTime
-
active
protected boolean active
-
absentTiles
protected AbsentResourceList absentTiles
-
-
Constructor Detail
-
Level
public Level(AVList params)
-
-
Method Detail
-
validate
protected java.lang.String validate(AVList params)
Determines whether the constructor arguments are valid.- Parameters:
params- the list of parameters to validate.- Returns:
- null if valid, otherwise a
Stringcontaining a description of why it's invalid.
-
getParams
public AVList getParams()
-
getPath
public java.lang.String getPath()
-
getLevelNumber
public int getLevelNumber()
-
getLevelName
public java.lang.String getLevelName()
-
getTileDelta
public LatLon getTileDelta()
-
getTileWidth
public int getTileWidth()
-
getTileHeight
public int getTileHeight()
-
getFormatSuffix
public java.lang.String getFormatSuffix()
-
getService
public java.lang.String getService()
-
getDataset
public java.lang.String getDataset()
-
getCacheName
public java.lang.String getCacheName()
-
getTexelSize
public double getTexelSize()
-
isEmpty
public boolean isEmpty()
-
markResourceAbsent
public void markResourceAbsent(long tileNumber)
-
isResourceAbsent
public boolean isResourceAbsent(long tileNumber)
-
unmarkResourceAbsent
public void unmarkResourceAbsent(long tileNumber)
-
getExpiryTime
public long getExpiryTime()
-
setExpiryTime
public void setExpiryTime(long expTime)
-
isActive
public boolean isActive()
-
setActive
public void setActive(boolean active)
-
getAbsentTiles
public AbsentResourceList getAbsentTiles()
-
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.
-
getTileResourceURL
public java.net.URL getTileResourceURL(Tile tile, java.lang.String imageFormat) throws java.net.MalformedURLException
Returns the URL necessary to retrieve the specified tile.- Parameters:
tile- the tile who's resources will be retrieved.imageFormat- a string identifying the mime type of the desired image format- Returns:
- the resource URL.
- Throws:
java.net.MalformedURLException- if the URL cannot be formed from the tile's parameters.java.lang.IllegalArgumentException- iftileis null.
-
computeSectorForPosition
public Sector computeSectorForPosition(Angle latitude, Angle longitude, LatLon tileOrigin)
-
compareTo
public int compareTo(Level that)
- Specified by:
compareToin interfacejava.lang.Comparable<Level>
-
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
-
-