Class ObservableValue<T>

java.lang.Object
org.patternfly.core.ObservableValue<T>

public class ObservableValue<T> extends Object
Inspired by FrontendMasters/obervablish-values.
See Also:
  • Method Details

    • ov

      public static <T> ObservableValue<T> ov(T initial)
    • get

      public T get()
    • silent

      public void silent(T value)
      Sets the value of the ObservableValue, but does not notify subscribers.
    • set

      public void set(T value)
      Sets the value of the ObservableValue and notifies subscribers if the value has changed.
    • change

      public void change(T value)
      Sets the value of the ObservableValue to the specified value and notifies subscribers regardless of whether the value has changed.
    • subscribe

      public ObservableValue<T> subscribe(ObservableValue.Subscriber<T> fn)
    • publish

      public void publish()