|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.deduced.ListenTargetTracker<K,V>
K - key of the listenerV - value of the listenerpublic class ListenTargetTracker<K,V>
Listen Target Tracker allows a listener to listen to multiple property collections multiple times.
| Field Summary | |
|---|---|
private PropertyListener<K,V> |
listener
listener |
private java.util.Map<PropertyCollection<? extends K,? extends V>,java.lang.Integer> |
listenTargetMap
map of all the targets to listen to and the number of times we hooked a listener on them |
| Constructor Summary | |
|---|---|
ListenTargetTracker(PropertyListener<K,V> setListener)
ListenTargetTracker Constructor |
|
| Method Summary | |
|---|---|
void |
add(PropertyCollection<? extends K,? extends V> target)
add a collection to listen to |
void |
clear()
clear will remove the listener to all the collections that are tracked. |
PropertyListener<K,V> |
getListener()
get Listener |
boolean |
isListeningTo(PropertyCollection<? extends K,? extends V> target)
test if this tracker is listening to a target |
boolean |
remove(PropertyCollection<? extends K,? extends V> target)
remove a collection that we don't want to listen to anymore. |
boolean |
removeAll(PropertyCollection<? extends K,? extends V> target)
remove a collection that we don't want to listen to anymore. |
private void |
removeListener(PropertyCollection<? extends K,? extends V> target)
remove a listener |
void |
setListener(PropertyListener<K,V> setListener)
set Listener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private PropertyListener<K,V> listener
private java.util.Map<PropertyCollection<? extends K,? extends V>,java.lang.Integer> listenTargetMap
| Constructor Detail |
|---|
public ListenTargetTracker(PropertyListener<K,V> setListener)
setListener - the listener to use| Method Detail |
|---|
public void setListener(PropertyListener<K,V> setListener)
setListener - the new listenerpublic void add(PropertyCollection<? extends K,? extends V> target)
target - a collection to listen topublic boolean removeAll(PropertyCollection<? extends K,? extends V> target)
target - a collection that we don't want to listen to anymore.
private void removeListener(PropertyCollection<? extends K,? extends V> target)
target - the listener to removepublic PropertyListener<K,V> getListener()
public boolean isListeningTo(PropertyCollection<? extends K,? extends V> target)
target - the target to verify
public boolean remove(PropertyCollection<? extends K,? extends V> target)
target - a collection that we don't want to listen to anymore.
public void clear()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||