Class AbstractValue<T>

java.lang.Object
dev.pfaff.altargui.util.listenable.AbstractSignal
dev.pfaff.altargui.util.listenable.AbstractValue<T>
All Implemented Interfaces:
Signal, Value<T>, WritableValue<T>
Direct Known Subclasses:
SlotValue

public abstract class AbstractValue<T> extends AbstractSignal implements WritableValue<T>
  • Constructor Details

    • AbstractValue

      public AbstractValue()
  • Method Details

    • listen

      public final ListenerDisposer listen(Consumer<T> listener)
      Description copied from interface: Value
      Adds a listener. The listener may not be added again if already added. When added, it is guaranteed to be invoked immediately with the current value.
      Specified by:
      listen in interface Value<T>
    • notifyUpdateValue

      protected final void notifyUpdateValue(T value)
    • writeNoNotify

      public abstract boolean writeNoNotify(T value)
      Returns:
      whether the value was updated.
    • write

      public final void write(T value)
      Specified by:
      write in interface WritableValue<T>