|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nasa.worldwind.avlist.AVListImpl
public class AVListImpl
An implementation class for the AVList interface. Classes implementing AVList can subclass or
aggreate this class to provide default AVList functionality. This class maintains a hash table of
attribute-value pairs.
PropertyChangeSupport.
| Field Summary | |
|---|---|
protected PropertyChangeSupport |
changeSupport
Available to sub-classes for further exposure of property-change functionality. |
| Constructor Summary | |
|---|---|
AVListImpl()
Creates an empty attribute-value list. |
|
AVListImpl(Object sourceBean)
Constructor enabling aggregation |
|
| 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. |
static Double |
getDoubleValue(AVList avList,
String key)
|
static Double |
getDoubleValue(AVList avList,
String key,
Double defaultValue)
|
Set<Map.Entry<String,Object>> |
getEntries()
|
static Integer |
getIntegerValue(AVList avList,
String key)
|
static Integer |
getIntegerValue(AVList avList,
String key,
Integer defaultValue)
|
static Long |
getLongValue(AVList avList,
String key)
|
static Long |
getLongValue(AVList avList,
String key,
Long defaultValue)
|
static String |
getStringValue(AVList avList,
String key)
|
static String |
getStringValue(AVList avList,
String key,
String defaultValue)
|
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 list)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final PropertyChangeSupport changeSupport
| Constructor Detail |
|---|
public AVListImpl()
public AVListImpl(Object sourceBean)
sourceBean - The bean to be given as the soruce for any events.| Method Detail |
|---|
public void addPropertyChangeListener(PropertyChangeListener listener)
AVList
addPropertyChangeListener in interface AVListlistener - the listener to call.PropertyChangeSupport
public void addPropertyChangeListener(String propertyName,
PropertyChangeListener listener)
AVList
addPropertyChangeListener in interface AVListpropertyName - the key to associate the listener with.listener - the listener to associate with the key.PropertyChangeSupportpublic final AVList clearList()
clearList in interface AVListpublic AVList copy()
AVListAVList instance: the keys and values themselves are not cloned.
copy in interface AVListAVList.public void firePropertyChange(PropertyChangeEvent propertyChangeEvent)
AVList
firePropertyChange in interface AVListpropertyChangeEvent - the eventPropertyChangeSupport
public void firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
AVListodValue and newValue are equal and non-null.
firePropertyChange in interface AVListpropertyName - the keyoldValue - the value associated with the key before the even causing the firing.newValue - the new value associated with the key.PropertyChangeSupport
public static Double getDoubleValue(AVList avList,
String key)
public static Double getDoubleValue(AVList avList,
String key,
Double defaultValue)
public Set<Map.Entry<String,Object>> getEntries()
getEntries in interface AVList
public static Integer getIntegerValue(AVList avList,
String key)
public static Integer getIntegerValue(AVList avList,
String key,
Integer defaultValue)
public static Long getLongValue(AVList avList,
String key)
public static Long getLongValue(AVList avList,
String key,
Long defaultValue)
public static String getStringValue(AVList avList,
String key)
public static String getStringValue(AVList avList,
String key,
String defaultValue)
public final String getStringValue(String key)
AVListString.
getStringValue in interface AVListkey - the attribute name. May not be null.
null.public final Object getValue(String key)
AVList
getValue in interface AVListkey - the attribute name. May not be null.
null.public final Collection<Object> getValues()
getValues in interface AVListpublic final boolean hasKey(String key)
AVList
hasKey in interface AVListkey - the attribute name. May not be null.
true if the key exists in the collection, otherwise false.public final void removeKey(String key)
AVList
removeKey in interface AVListkey - the attribute name. May not be null.public void removePropertyChangeListener(PropertyChangeListener listener)
AVList
removePropertyChangeListener in interface AVListlistener - the listener to remove.PropertyChangeSupport
public void removePropertyChangeListener(String propertyName,
PropertyChangeListener listener)
AVList
removePropertyChangeListener in interface AVListpropertyName - the key associated with the change listener.listener - the listener to remove.PropertyChangeSupport
public final void setValue(String key,
Object value)
AVList
setValue in interface AVListkey - 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.public final void setValues(AVList list)
setValues in interface AVList
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||