package devopsdistilled.operp.client.abstracts;

import java.util.ArrayList;
import java.util.List;

public abstract class AbstractModel<O extends Observer> implements Model<O> {
	protected final List<O> observers;

	public AbstractModel() {
		observers = new ArrayList<>();
	}

	@Override
	public void registerObserver(O observer) {
		observers.add(observer);
	}

	@Override
	public void removeObserver(O observer) {
		int i = observers.indexOf(observer);
		if (i >= 0) {
			observers.remove(i);
		}
	}

}

@@ -496,12 +496,64 @@
 ;%0A%09%09%7D%0A%09%7D
+%0A%09%0A%09@Override%0A%09public void notifyObservers() %7B%0A%09%09%0A%09%7D
 %0A%0A%7D%0A

Define NOP notifyObservers()