fixed the lister handling
This commit is contained in:
parent
7a44617da0
commit
952d3585a0
@ -607,11 +607,14 @@ public class DifferentialEvolution implements InterfaceOptimizer, java.io.Serial
|
||||
* @param ea
|
||||
*/
|
||||
public void addPopulationChangedEventListener(InterfacePopulationChangedEventListener ea) {
|
||||
if(this.m_Listener ==null){
|
||||
this.m_Listener=new Vector<InterfacePopulationChangedEventListener>();
|
||||
}
|
||||
this.m_Listener.add(ea);
|
||||
}
|
||||
public boolean removePopulationChangedEventListener(
|
||||
InterfacePopulationChangedEventListener ea) {
|
||||
if (m_Listener.removeElement(ea)) {
|
||||
if (m_Listener!=null&&m_Listener.removeElement(ea)) {
|
||||
|
||||
return true;
|
||||
} else return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user