V8 HasValue.ValueChangeListener<V> add and remove

In the V8 framework to add ValueChangeLictener we use method hasValue.addValueChangeListener.
Is there any way to temporary disable or remove listener?
removeListener method is deprecated

In my case I have to use wraper like this:

protected <X> Registration addValueChangeListener(HasValue<X> hasValue, HasValue.ValueChangeListener<X> listener) {
        return hasValue.addValueChangeListener(e -> {
            if (enableListeners) {
        } );

Hi, the Registration object returned from addValueChangeListener can be used to remove the listener.


Today I’ve found a better solution for my case.
ValueChangeEvent::isUserOriginated let me know who changing the value, so I don’t need to temporary disable listener )))