package eu.oschl.gui;

import java.util.HashSet;
import java.util.Set;

public abstract class Observable {
    protected Set<Observer> observers = new HashSet<>();

    public void register(Observer observer) {
        observers.add(observer);
    }

    public void sendEvent() {
        for (Observer observer : observers) {
            observer.update();
        }
    }
}
