public static <T> void dispatchAndRemoveIf(@Nonnull ObservableValue<T> value, @Nonnull Predicate<? super T> test) {
		dispatchAndRemoveIf(value, (observable, oldValue, newValue) -> test.test(newValue));
	}
Registers an event listener and removes it,
as soon as {@link RemovalChangeListener} returns {@code true}.

@param value
		Value to register listener for.
@param test
		Test function for a new value.
@param <T>
		Value type.
recaf-ui/src/main/java/software/coley/recaf/util/NodeEvents.java