NASA World Wind

gov.nasa.worldwind.layers
Class LayerList

java.lang.Object
  extended by java.util.concurrent.CopyOnWriteArrayList<Layer>
      extended by gov.nasa.worldwind.layers.LayerList
All Implemented Interfaces:
AVList, WWObject, java.beans.PropertyChangeListener, java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<Layer>, java.util.Collection<Layer>, java.util.EventListener, java.util.List<Layer>, java.util.RandomAccess

public class LayerList
extends java.util.concurrent.CopyOnWriteArrayList<Layer>
implements WWObject

See Also:
Serialized Form

Constructor Summary
LayerList()
           
LayerList(Layer[] layers)
           
 
Method Summary
 void add(int index, Layer layer)
           
 boolean add(Layer layer)
           
 boolean addAll(java.util.Collection<? extends Layer> layers)
           
 boolean addAll(int i, java.util.Collection<? extends Layer> layers)
           
 int addAllAbsent(java.util.Collection<? extends Layer> layers)
           
 boolean addIfAbsent(Layer layer)
           
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Adds the specified all-property property change listener that will be called for all list changes.
 void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
          Adds a property change listener for the specified key.
 AVList clearList()
           
 java.lang.Object clone()
           
 AVList copy()
          Returns a shallow copy of this AVList instance: the keys and values themselves are not cloned.
 void firePropertyChange(java.beans.PropertyChangeEvent propertyChangeEvent)
          Calls all registered property change listeners with the specified property change event.
 void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
          Calls all property change listeners associated with the specified key.
 java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> getEntries()
           
 java.lang.String getStringValue(java.lang.String key)
          Returns the value for a specified key.
 java.lang.Object getValue(java.lang.String key)
          Returns the value for a specified key.
 java.util.Collection<java.lang.Object> getValues()
           
 boolean hasKey(java.lang.String key)
          Indicates whether a key is in the collection.
 void propertyChange(java.beans.PropertyChangeEvent propertyChangeEvent)
           
 Layer remove(int index)
           
 void remove(Layer layer)
           
 boolean remove(java.lang.Object o)
           
 boolean removeAll(java.util.Collection<?> objects)
           
 void removeKey(java.lang.String key)
          Removes a specified key from the collection if the key exists, otherwise returns without affecting the collection.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Removes the specified all-property property change listener.
 void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
          Removes a property change listener associated with the specified key.
 boolean retainAll(java.util.Collection<?> objects)
           
 Layer set(int index, Layer layer)
           
 void setValue(java.lang.String key, java.lang.Object value)
          Adds a key/value pair to the list.
 void setValues(AVList avList)
           
 LayerList sort()
           
 java.lang.String toString()
           
 
Methods inherited from class java.util.concurrent.CopyOnWriteArrayList
clear, contains, containsAll, equals, get, hashCode, indexOf, indexOf, isEmpty, iterator, lastIndexOf, lastIndexOf, listIterator, listIterator, size, subList, toArray, toArray
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LayerList

public LayerList()

LayerList

public LayerList(Layer[] layers)
Method Detail

add

public void add(int index,
                Layer layer)
Specified by:
add in interface java.util.List<Layer>
Overrides:
add in class java.util.concurrent.CopyOnWriteArrayList<Layer>

add

public boolean add(Layer layer)
Specified by:
add in interface java.util.Collection<Layer>
Specified by:
add in interface java.util.List<Layer>
Overrides:
add in class java.util.concurrent.CopyOnWriteArrayList<Layer>

addAll

public boolean addAll(java.util.Collection<? extends Layer> layers)
Specified by:
addAll in interface java.util.Collection<Layer>
Specified by:
addAll in interface java.util.List<Layer>
Overrides:
addAll in class java.util.concurrent.CopyOnWriteArrayList<Layer>

addAll

public boolean addAll(int i,
                      java.util.Collection<? extends Layer> layers)
Specified by:
addAll in interface java.util.List<Layer>
Overrides:
addAll in class java.util.concurrent.CopyOnWriteArrayList<Layer>

addAllAbsent

public int addAllAbsent(java.util.Collection<? extends Layer> layers)
Overrides:
addAllAbsent in class java.util.concurrent.CopyOnWriteArrayList<Layer>

addIfAbsent

public boolean addIfAbsent(Layer layer)
Overrides:
addIfAbsent in class java.util.concurrent.CopyOnWriteArrayList<Layer>

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Description copied from interface: AVList
Adds the specified all-property property change listener that will be called for all list changes.

Specified by:
addPropertyChangeListener in interface AVList
Parameters:
listener - the listener to call.
See Also:
PropertyChangeSupport

addPropertyChangeListener

public void addPropertyChangeListener(java.lang.String propertyName,
                                      java.beans.PropertyChangeListener listener)
Description copied from interface: AVList
Adds a property change listener for the specified key.

Specified by:
addPropertyChangeListener in interface AVList
Parameters:
propertyName - the key to associate the listener with.
listener - the listener to associate with the key.
See Also:
PropertyChangeSupport

clearList

public AVList clearList()
Specified by:
clearList in interface AVList

clone

public java.lang.Object clone()
Overrides:
clone in class java.util.concurrent.CopyOnWriteArrayList<Layer>

copy

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

Specified by:
copy in interface AVList
Returns:
a shallow copy of this AVList.

firePropertyChange

public void firePropertyChange(java.beans.PropertyChangeEvent propertyChangeEvent)
Description copied from interface: AVList
Calls all registered property change listeners with the specified property change event.

Specified by:
firePropertyChange in interface AVList
Parameters:
propertyChangeEvent - the event
See Also:
PropertyChangeSupport

firePropertyChange

public void firePropertyChange(java.lang.String propertyName,
                               java.lang.Object oldValue,
                               java.lang.Object newValue)
Description copied from interface: AVList
Calls all property change listeners associated with the specified key. No listeners are called if odValue and newValue are equal and non-null.

Specified by:
firePropertyChange in interface AVList
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.
See Also:
PropertyChangeSupport

getEntries

public java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> getEntries()
Specified by:
getEntries in interface AVList

getStringValue

public java.lang.String getStringValue(java.lang.String key)
Description copied from interface: AVList
Returns the value for a specified key. The value must be a String.

Specified by:
getStringValue in interface AVList
Parameters:
key - the attribute name. May not be null.
Returns:
the attribute value if one exists in the collection, otherwise null.

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
Parameters:
key - the attribute name. May not be null.
Returns:
the attribute value if one exists in the collection, otherwise null.

getValues

public java.util.Collection<java.lang.Object> getValues()
Specified by:
getValues in interface AVList

hasKey

public boolean hasKey(java.lang.String key)
Description copied from interface: AVList
Indicates whether a key is in the collection.

Specified by:
hasKey in interface AVList
Parameters:
key - the attribute name. May not be null.
Returns:
true if the key exists in the collection, otherwise false.

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent propertyChangeEvent)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener

remove

public Layer remove(int index)
Specified by:
remove in interface java.util.List<Layer>
Overrides:
remove in class java.util.concurrent.CopyOnWriteArrayList<Layer>

remove

public void remove(Layer layer)

remove

public boolean remove(java.lang.Object o)
Specified by:
remove in interface java.util.Collection<Layer>
Specified by:
remove in interface java.util.List<Layer>
Overrides:
remove in class java.util.concurrent.CopyOnWriteArrayList<Layer>

removeAll

public boolean removeAll(java.util.Collection<?> objects)
Specified by:
removeAll in interface java.util.Collection<Layer>
Specified by:
removeAll in interface java.util.List<Layer>
Overrides:
removeAll in class java.util.concurrent.CopyOnWriteArrayList<Layer>

removeKey

public void removeKey(java.lang.String key)
Description copied from interface: AVList
Removes a specified key from the collection if the key exists, otherwise returns without affecting the collection.

Specified by:
removeKey in interface AVList
Parameters:
key - the attribute name. May not be null.

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Description copied from interface: AVList
Removes the specified all-property property change listener.

Specified by:
removePropertyChangeListener in interface AVList
Parameters:
listener - the listener to remove.
See Also:
PropertyChangeSupport

removePropertyChangeListener

public void removePropertyChangeListener(java.lang.String propertyName,
                                         java.beans.PropertyChangeListener listener)
Description copied from interface: AVList
Removes a property change listener associated with the specified key.

Specified by:
removePropertyChangeListener in interface AVList
Parameters:
propertyName - the key associated with the change listener.
listener - the listener to remove.
See Also:
PropertyChangeSupport

retainAll

public boolean retainAll(java.util.Collection<?> objects)
Specified by:
retainAll in interface java.util.Collection<Layer>
Specified by:
retainAll in interface java.util.List<Layer>
Overrides:
retainAll in class java.util.concurrent.CopyOnWriteArrayList<Layer>

set

public Layer set(int index,
                 Layer layer)
Specified by:
set in interface java.util.List<Layer>
Overrides:
set in class java.util.concurrent.CopyOnWriteArrayList<Layer>

setValue

public void 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
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.

setValues

public void setValues(AVList avList)
Specified by:
setValues in interface AVList

sort

public LayerList sort()

toString

public java.lang.String toString()
Overrides:
toString in class java.util.concurrent.CopyOnWriteArrayList<Layer>

NASA World Wind