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