/*
- * Copyright © 2019 Damyan Ivanov.
+ * Copyright © 2020 Damyan Ivanov.
* This file is part of MoLe.
* MoLe is free software: you can distribute it and/or modify it
* under the term of the GNU General Public License as published by
public void notifyObservers() {
impl.notifyObservers();
}
- public void notifyObservers(Object arg) {
+ public void notifyObservers(T arg) {
impl.notifyObservers(arg);
}
public void deleteObservers() {
public int countObservers() {
return impl.countObservers();
}
+ public void forceNotifyObservers() {
+ impl.setChanged();
+ impl.notifyObservers();
+ }
private class ObservableValueImpl<T> extends Observable {
protected T value;
public void setValue(T newValue) {
setValue(newValue, true);
}
+ protected void setChanged() {
+ super.setChanged();
+ }
private synchronized void setValue(T newValue, boolean notify) {
if ((newValue == null) && (value == null)) return;