Minor cosmetics. (mk rev 209)
This commit is contained in:
parent
8bdafeb957
commit
45d35a68e3
@ -232,7 +232,7 @@ public class Population extends ArrayList implements PopulationInterface, Clonea
|
|||||||
if (listeners != null) {
|
if (listeners != null) {
|
||||||
for (Iterator iterator = listeners.iterator(); iterator.hasNext();) {
|
for (Iterator iterator = listeners.iterator(); iterator.hasNext();) {
|
||||||
InterfacePopulationChangedEventListener listener = (InterfacePopulationChangedEventListener) iterator.next();
|
InterfacePopulationChangedEventListener listener = (InterfacePopulationChangedEventListener) iterator.next();
|
||||||
listener.registerPopulationStateChanged(this, name);
|
if (listener!=null) listener.registerPopulationStateChanged(this, name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -300,9 +300,11 @@ public class Population extends ArrayList implements PopulationInterface, Clonea
|
|||||||
* @param ea
|
* @param ea
|
||||||
*/
|
*/
|
||||||
public void addPopulationChangedEventListener(InterfacePopulationChangedEventListener ea) {
|
public void addPopulationChangedEventListener(InterfacePopulationChangedEventListener ea) {
|
||||||
if (listeners == null) listeners = new ArrayList<InterfacePopulationChangedEventListener>(3);
|
if (ea != null) {
|
||||||
if (!listeners.contains(ea)) {
|
if (listeners == null) listeners = new ArrayList<InterfacePopulationChangedEventListener>(3);
|
||||||
listeners.add(ea);
|
if (!listeners.contains(ea)) {
|
||||||
|
listeners.add(ea);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user