com.jme.util.export
Class ListenableStringFloatMap
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<java.lang.String,V>
com.jme.util.export.AbstractStringKeyMap<java.lang.Float>
com.jme.util.export.StringFloatMap
com.jme.util.export.ListenableStringFloatMap
- All Implemented Interfaces:
- Savable, java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,java.lang.Float>
public class ListenableStringFloatMap
- extends StringFloatMap
A StringFloatMap which can be listened to in order to get notification when
specified values in the map are modified.
- See Also:
- Serialized Form
| Methods inherited from class java.util.HashMap |
clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, size, values |
| Methods inherited from class java.util.AbstractMap |
equals, hashCode, toString |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
equals, hashCode |
serialVersionUID
static final long serialVersionUID
- See Also:
- Constant Field Values
changeListeners
protected java.util.Map<java.lang.String,java.util.Set<ListenableStringFloatMap.FloatListener>> changeListeners
ListenableStringFloatMap
public ListenableStringFloatMap()
ListenableStringFloatMap
public ListenableStringFloatMap(int initialCapacity)
ListenableStringFloatMap
public ListenableStringFloatMap(int initialCapacity,
float loadFactor)
ListenableStringFloatMap
public ListenableStringFloatMap(java.util.Map<? extends java.lang.String,? extends java.lang.Float> m)
listenerReport
public java.lang.String listenerReport()
addListener
public void addListener(ListenableStringFloatMap.FloatListener changeListener,
java.util.Collection<java.lang.String> keys)
- IMPORTANT: MAKE SURE TO CALL removeListener() WHEN YOU ARE FINISHED.
Otherwise you will cause a memory leak when your instance is not
garbage collected.
removeListener
public void removeListener(ListenableStringFloatMap.FloatListener changeListener)
cullListenerSets
protected void cullListenerSets()
getListeners
protected java.util.Set<ListenableStringFloatMap.FloatListener> getListeners()
getListenerCount
public int getListenerCount()
clear
public void clear()
- Specified by:
clear in interface java.util.Map<java.lang.String,java.lang.Float>- Overrides:
clear in class java.util.HashMap<java.lang.String,java.lang.Float>
notifyListener
protected void notifyListener(ListenableStringFloatMap.FloatListener listener)
putAll
public void putAll(java.util.Map<? extends java.lang.String,? extends java.lang.Float> newMappings)
- IMPORTANT: This method will notify the caller if the caller is
listening. If you don't want that, then wrap your putAll() call inside
of removeListener and addListener calls.
- Specified by:
putAll in interface java.util.Map<java.lang.String,java.lang.Float>- Overrides:
putAll in class java.util.HashMap<java.lang.String,java.lang.Float>
notifyAbout
protected void notifyAbout(java.util.Collection<? extends java.lang.String> keys)
put
public java.lang.Float put(java.lang.String key,
java.lang.Float f)
- Specified by:
put in interface java.util.Map<java.lang.String,java.lang.Float>- Overrides:
put in class java.util.HashMap<java.lang.String,java.lang.Float>
remove
public java.lang.Float remove(java.lang.Object key)
- Specified by:
remove in interface java.util.Map<java.lang.String,java.lang.Float>- Overrides:
remove in class java.util.HashMap<java.lang.String,java.lang.Float>
Copyright 2003-2009 jMonkeyEngine