Interface ObservableProperty<T>
- All Superinterfaces:
Functor<T>,MutableProperty<T>,Property<T>
- All Known Subinterfaces:
ConfigOption<T>,ObservableBooleanProperty,ObservableFloatProperty,ObservableIntProperty,ObservableObjectProperty<T>,ObservableStringProperty,SimpleObservableProperty<T>
- All Known Implementing Classes:
BooleanConfigOption,DeserializedBooleanProperty,DeserializedFloatProperty,DeserializedIntProperty,DeserializedObjectProperty,DeserializedStringProperty,FileDeserializer,FloatConfigOption,HotFileDeserializer,IntConfigOption,ObjectConfigOption,SelectionProperty,SimpleObservableBooleanProperty,SimpleObservableFloatProperty,SimpleObservableIntProperty,SimpleObservableObjectProperty,SimpleObservableStringProperty,SingleSelectionProperty,StringConfigOption
A property that triggers observers whenever its value changes.
-
Field Summary
Fields -
Method Summary
Methods inherited from interface dev.prozilla.pine.common.property.mutable.MutableProperty
modifyValue, setValue, swapValue, viewPropertyMethods inherited from interface dev.prozilla.pine.common.property.Property
getValue, getValueOr, hasValue, hasValueProperty, isNotNull, isNotNullProperty, isNull, map, replaceNull, requireValue, snapshot, toStringProperty
-
Field Details
-
OBSERVER_ERROR
- See Also:
-
-
Method Details
-
read
Adds an observer that is immediately called with the current value.This is the equivalent of calling
Property.getValue(), then doing something with that value, and then adding an observer which does the same thing each time the value changes.- Parameters:
reader- The observer
-
addObserver
-
removeObserver
-