NASA World Wind

gov.nasa.worldwind.avlist
Interface AVList

All Known Subinterfaces:
DrawContext, ElevationModel, Globe, InputHandler, Layer, Model, NetworkStatus, OrbitView, RetrievalService, Retriever, SceneController, Tessellator, View, WorldWindow, WorldWindowGLDrawable, WWObject
All Known Implementing Classes:
AbstractLayer, AbstractSceneController, AbstractView, AnaglyphSceneController, AnnotationLayer, AVListImpl, AWTInputHandler, BasicElevationModel, BasicModel, BasicNetworkStatus, BasicOrbitView, BasicRetrievalService, BasicSceneController, BasicTiledImageLayer, BMNGOneImage, BMNGSurfaceLayer, BMNGWMSLayer, Clementine30Layer, Clementine40BaseLayer, Clementine40Layer, CompassLayer, CountryBoundariesLayer, CrosshairLayer, DrawContextImpl, Earth, EarthElevationModel, EarthFlat, EarthNASAPlaceNameLayer, EllipsoidalGlobe, FlatGlobe, FlatOrbitView, FogLayer, HTTPRetriever, IconLayer, LandsatI3, LandsatI3WMSLayer, LayerList, LevelSet, LicenseAgreement, LineBuilder, Mars, MarsElevationModel, MDIMLayer, MGRSGraticuleLayer, MOCColorizedBaseLayer, MOCColorizedLayer, MOCLayer, MolaColorASULayer, MolaColoredJPLLayer, Moon, MoonElevationModel, NAIPCalifornia, NAIPCaliforniaWMS, NASAEarthObservatory, NASAWFSPlaceNameLayer, NOSALicenseAgreement, OpenStreetMapLayer, Pedestal, PickedObject, PlaceNameLayer, RectangularTessellator, RenderableLayer, RPFTiledImageLayer, ScalebarLayer, ShadedElevationLayer, SkyColorLayer, SkyGradientLayer, StarsLayer, SurfaceImageLayer, TerrainProfileLayer, THEMISColorLayer, THEMISLayer, ThreadedTaskService, TiledImageLayer, TrackLayer, TrackMarkerLayer, TrackPipesLayer, URLRetriever, UserFacingIcon, USGSDigitalOrtho, USGSTopographicMaps, USGSTopoHighRes, USGSTopoLowRes, USGSTopoMedRes, USGSUrbanAreaOrtho, UTMGraticuleLayer, WMSTiledImageLayer, WorldMapLayer, WorldWindowGLAutoDrawable, WorldWindowGLCanvas, WorldWindowGLJPanel, WorldWindowImpl, WWObjectImpl

public interface AVList

An interface for managing an attribute-value pair collection.


Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          Adds the specified all-property property change listener that will be called for all list changes.
 void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
          Adds a property change listener for the specified key.
 AVList clearList()
           
 AVList copy()
          Returns a shallow copy of this AVList instance: the keys and values themselves are not cloned.
 void firePropertyChange(PropertyChangeEvent propertyChangeEvent)
          Calls all registered property change listeners with the specified property change event.
 void firePropertyChange(String propertyName, Object oldValue, Object newValue)
          Calls all property change listeners associated with the specified key.
 Set<Map.Entry<String,Object>> getEntries()
           
 String getStringValue(String key)
          Returns the value for a specified key.
 Object getValue(String key)
          Returns the value for a specified key.
 Collection<Object> getValues()
           
 boolean hasKey(String key)
          Indicates whether a key is in the collection.
 void removeKey(String key)
          Removes a specified key from the collection if the key exists, otherwise returns without affecting the collection.
 void removePropertyChangeListener(PropertyChangeListener listener)
          Removes the specified all-property property change listener.
 void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
          Removes a property change listener associated with the specified key.
 void setValue(String key, Object value)
          Adds a key/value pair to the list.
 void setValues(AVList avList)
           
 

Method Detail

addPropertyChangeListener

void addPropertyChangeListener(PropertyChangeListener listener)
Adds the specified all-property property change listener that will be called for all list changes.

Parameters:
listener - the listener to call.
Throws:
IllegalArgumentException - if listener is null
See Also:
PropertyChangeSupport

addPropertyChangeListener

void addPropertyChangeListener(String propertyName,
                               PropertyChangeListener listener)
Adds a property change listener for the specified key.

Parameters:
propertyName - the key to associate the listener with.
listener - the listener to associate with the key.
Throws:
IllegalArgumentException - if either propertyName or listener is null
See Also:
PropertyChangeSupport

clearList

AVList clearList()

copy

AVList copy()
Returns a shallow copy of this AVList instance: the keys and values themselves are not cloned.

Returns:
a shallow copy of this AVList.

firePropertyChange

void firePropertyChange(PropertyChangeEvent propertyChangeEvent)
Calls all registered property change listeners with the specified property change event.

Parameters:
propertyChangeEvent - the event
Throws:
IllegalArgumentException - if propertyChangeEvent is null
See Also:
PropertyChangeSupport

firePropertyChange

void firePropertyChange(String propertyName,
                        Object oldValue,
                        Object newValue)
Calls all property change listeners associated with the specified key. No listeners are called if odValue and newValue are equal and non-null.

Parameters:
propertyName - the key
oldValue - the value associated with the key before the even causing the firing.
newValue - the new value associated with the key.
Throws:
IllegalArgumentException - if propertyName is null
See Also:
PropertyChangeSupport

getEntries

Set<Map.Entry<String,Object>> getEntries()

getStringValue

String getStringValue(String key)
Returns the value for a specified key. The value must be a String.

Parameters:
key - the attribute name. May not be null.
Returns:
the attribute value if one exists in the collection, otherwise null.
Throws:
NullPointerException - if key is null.
WWRuntimeException - if the value in the collection is not a String type.

getValue

Object getValue(String key)
Returns the value for a specified key.

Parameters:
key - the attribute name. May not be null.
Returns:
the attribute value if one exists in the collection, otherwise null.
Throws:
NullPointerException - if key is null.

getValues

Collection<Object> getValues()

hasKey

boolean hasKey(String key)
Indicates whether a key is in the collection.

Parameters:
key - the attribute name. May not be null.
Returns:
true if the key exists in the collection, otherwise false.
Throws:
NullPointerException - if key is null.

removeKey

void removeKey(String key)
Removes a specified key from the collection if the key exists, otherwise returns without affecting the collection.

Parameters:
key - the attribute name. May not be null.
Throws:
NullPointerException - if key is null.

removePropertyChangeListener

void removePropertyChangeListener(PropertyChangeListener listener)
Removes the specified all-property property change listener.

Parameters:
listener - the listener to remove.
Throws:
IllegalArgumentException - if listener is null
See Also:
PropertyChangeSupport

removePropertyChangeListener

void removePropertyChangeListener(String propertyName,
                                  PropertyChangeListener listener)
Removes a property change listener associated with the specified key.

Parameters:
propertyName - the key associated with the change listener.
listener - the listener to remove.
Throws:
IllegalArgumentException - if either propertyName or listener is null
See Also:
PropertyChangeSupport

setValue

void setValue(String key,
              Object value)
Adds a key/value pair to the list. Replaces an existing key/value pair if the list already contains the key.

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.
Throws:
NullPointerException - if key is null.

setValues

void setValues(AVList avList)

NASA World Wind