Interface Observer<T>

  • Type Parameters:
    T - the type of the value to observe
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface Observer<T>
    Observes changes to the value of an Observable.
    • Method Detail

      • onChange

        void onChange​(T previous,
                      T current)
        Called when the value of the observable changes.
        Parameters:
        previous - the previous value of the observable
        current - the current value of the observable