mvvmfx-utils/src/main/java/de/saxsys/mvvmfx/utils/listener/ListenerManager.java
public <T> void register(ObservableValue<T> observable, ChangeListener<? super T> listener) {
		if (!simpleChangeListeners.containsKey(observable)) {
			this.simpleChangeListeners.put(observable, Collections.newSetFromMap(new WeakHashMap<>()));
		}
		
		Set<ChangeListener> observers = this.simpleChangeListeners.get(observable);
		observers.add(listener);
		observable.addListener(listener);
	}
public <T> void register(ObservableValue<T> observable, ChangeListener<? super T> listener) {
		if (!simpleChangeListeners.containsKey(observable)) {
			this.simpleChangeListeners.put(observable, Collections.newSetFromMap(new WeakHashMap<>()));
		}
		
		Set<ChangeListener> observers = this.simpleChangeListeners.get(observable);
		observers.add(listener);
		observable.addListener(listener);
	}
public < T > void register ( ObservableValue < T > observable , ChangeListener < ? super T > listener ) { if ( ! simpleChangeListeners . containsKey ( observable ) ) { this . simpleChangeListeners . put ( observable , Collections . newSetFromMap ( new WeakHashMap <> ( ) ) ) ; } Set < ChangeListener > observers = this . simpleChangeListeners . get ( observable ) ; observers . add ( listener ) ; observable . addListener ( listener ) ; }
Register the given {@link ChangeListener} to the {@link ObservableValue}. The listener is added to the observable
and will be added for management so it can be cleaned up with the {@link #clean()} method.

@param observable
the observable that the listener is added to.
@param listener
the listener that is registered.
@param <T>
the generic type of the observable value.
Register the given { @link ChangeListener } to the { @link ObservableValue } . The listener is added to the observable and will be added for management so it can be cleaned up with the { @link #clean () } method .