Source code for jmetal.core.observer

from abc import ABC, abstractmethod

"""
.. module:: Observable
   :platform: Unix, Windows
   :synopsis: Implementation of the observer-observable pattern.

.. moduleauthor:: Antonio J. Nebro <antonio@lcc.uma.es>
"""


[docs] class Observer(ABC):
[docs] @abstractmethod def update(self, *args, **kwargs): """Update method.""" pass
[docs] class Observable(ABC):
[docs] @abstractmethod def register(self, observer): pass
[docs] @abstractmethod def deregister(self, observer): pass
[docs] @abstractmethod def deregister_all(self): pass
[docs] @abstractmethod def notify_all(self, *args, **kwargs): pass