Interface ObservableIntProperty
- All Superinterfaces:
Functor<Integer>,IntProperty,MutableIntProperty,MutableProperty<Integer>,NonNullProperty<Integer>,ObservableProperty<Integer>,Property<Integer>
- All Known Implementing Classes:
DeserializedIntProperty,IntConfigOption,SimpleObservableIntProperty
A property with an integer value that can be observed.
-
Field Summary
Fields inherited from interface dev.prozilla.pine.common.property.observable.ObservableProperty
OBSERVER_ERROR -
Method Summary
Modifier and TypeMethodDescriptionaddObserver(IntObserver observer) addObserver(Observer<Integer> observer) default voidread(IntObserver reader) default voidAdds an observer that is immediately called with the current value.voidremoveObserver(IntObserver observer) default voidremoveObserver(Observer<Integer> observer) Methods inherited from interface dev.prozilla.pine.common.property.IntProperty
get, getValue, getValueOr, has, hasProperty, isZeroProperty, map, replaceNull, requireValueMethods inherited from interface dev.prozilla.pine.common.property.mutable.MutableIntProperty
modify, set, setValue, swap, viewPropertyMethods inherited from interface dev.prozilla.pine.common.property.mutable.MutableProperty
modifyValue, swapValueMethods inherited from interface dev.prozilla.pine.common.property.NonNullProperty
isNotNull, isNotNullPropertyMethods inherited from interface dev.prozilla.pine.common.property.Property
hasValue, hasValueProperty, isNull, map, snapshot, toStringProperty
-
Method Details
-
read
Description copied from interface:ObservablePropertyAdds 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.- Specified by:
readin interfaceObservableProperty<Integer>- Parameters:
reader- The observer
-
addObserver
- Specified by:
addObserverin interfaceObservableProperty<Integer>
-
removeObserver
- Specified by:
removeObserverin interfaceObservableProperty<Integer>
-
read
- See Also:
-
addObserver
-
removeObserver
-