Class Level

  • All Implemented Interfaces:
    AVList, java.lang.Comparable<Level>

    public class Level
    extends AVListImpl
    implements java.lang.Comparable<Level>
    • 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
      • expiryTime

        protected long expiryTime
      • active

        protected boolean active
    • 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 String containing 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)
      • 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 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.
      • 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 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.
      • 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 - if tile is null.
      • computeSectorForPosition

        public Sector computeSectorForPosition​(Angle latitude,
                                               Angle longitude,
                                               LatLon tileOrigin)
      • compareTo

        public int compareTo​(Level that)
        Specified by:
        compareTo in interface java.lang.Comparable<Level>
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object