gov.nasa.worldwind.util
Class Level
java.lang.Object
gov.nasa.worldwind.avlist.AVListImpl
gov.nasa.worldwind.util.Level
- All Implemented Interfaces:
- AVList, Comparable<Level>
public class Level
- extends AVListImpl
- implements Comparable<Level>
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 |
absentTiles
protected AbsentResourceList absentTiles
active
protected boolean active
cacheName
protected String cacheName
dataset
protected String dataset
expiryTime
protected long expiryTime
formatSuffix
protected String formatSuffix
levelName
protected String levelName
levelNumber
protected int levelNumber
params
protected AVList params
path
protected String path
service
protected String service
texelSize
protected double texelSize
tileDelta
protected LatLon tileDelta
tileHeight
protected int tileHeight
tileWidth
protected int tileWidth
urlBuilder
protected TileUrlBuilder urlBuilder
Level
public Level(AVList params)
compareTo
public int compareTo(Level that)
- Specified by:
compareTo
in interface Comparable<Level>
computeSectorForPosition
public Sector computeSectorForPosition(Angle latitude,
Angle longitude,
LatLon tileOrigin)
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
getAbsentTiles
public AbsentResourceList getAbsentTiles()
getCacheName
public String getCacheName()
getDataset
public String getDataset()
getExpiryTime
public long getExpiryTime()
getFormatSuffix
public String getFormatSuffix()
getLevelName
public String getLevelName()
getLevelNumber
public int getLevelNumber()
getParams
public AVList getParams()
getPath
public String getPath()
getService
public String getService()
getTexelSize
public double getTexelSize()
getTileDelta
public LatLon getTileDelta()
getTileHeight
public int getTileHeight()
getTileResourceURL
public URL getTileResourceURL(Tile tile,
String imageFormat)
throws 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:
MalformedURLException
- if the URL cannot be formed from the tile's parameters.
IllegalArgumentException
- if tile
is null.
getTileWidth
public int getTileWidth()
getValue
public Object getValue(String key)
- Description copied from interface:
AVList
- Returns the value for a specified key.
- Specified by:
getValue
in interface AVList
- Overrides:
getValue
in class AVListImpl
- Parameters:
key
- the attribute name. May not be null
.
- Returns:
- the attribute value if one exists in the collection, otherwise
null
.
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
isActive
public boolean isActive()
isEmpty
public boolean isEmpty()
isResourceAbsent
public boolean isResourceAbsent(long tileNumber)
markResourceAbsent
public void markResourceAbsent(long tileNumber)
setActive
public void setActive(boolean active)
setExpiryTime
public void setExpiryTime(long expTime)
setValue
public Object setValue(String key,
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 interface AVList
- Overrides:
setValue
in class AVListImpl
- Parameters:
key
- the attribute name. May not be null
.value
- the attribute value. May be null
, 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.
toString
public String toString()
- Overrides:
toString
in class Object
unmarkResourceAbsent
public void unmarkResourceAbsent(long tileNumber)
validate
protected 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
String
containing a description of why it's invalid.