Class DeserializedIntProperty
java.lang.Object
dev.prozilla.pine.common.property.mutable.SimpleMutableIntProperty
dev.prozilla.pine.common.property.observable.SimpleObservableIntProperty
dev.prozilla.pine.common.property.deserialized.DeserializedIntProperty
- All Implemented Interfaces:
Destructible,IntProperty,MutableIntProperty,MutableProperty<Integer>,NonNullProperty<Integer>,ObservableIntProperty,ObservableProperty<Integer>,SimpleObservableProperty<Integer>,Property<Integer>,Functor<Integer>
A property whose value is retrieved from a deserialized file.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceFactory method used to retrieve a value from a deserialized file. -
Field Summary
Fields inherited from class dev.prozilla.pine.common.property.observable.SimpleObservableIntProperty
loggerFields inherited from interface dev.prozilla.pine.common.property.observable.ObservableProperty
OBSERVER_ERROR -
Constructor Summary
ConstructorsConstructorDescriptionDeserializedIntProperty(FileDeserializer<Data> source, DeserializedIntProperty.ValueFactory<Data> valueFactory) DeserializedIntProperty(FileDeserializer<Data> source, DeserializedIntProperty.ValueFactory<Data> valueFactory, int fallbackValue) -
Method Summary
Modifier and TypeMethodDescriptionprotected static <Data> intcreateValue(Data data, DeserializedIntProperty.ValueFactory<Data> valueFactory, int fallbackValue) Retrieves the value from a given source of data using a value factory.Methods inherited from class dev.prozilla.pine.common.property.observable.SimpleObservableIntProperty
addObserver, destroy, getLogger, onValueChange, removeObserver, setLoggerMethods inherited from class dev.prozilla.pine.common.property.mutable.SimpleMutableIntProperty
get, setMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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.observable.ObservableIntProperty
addObserver, read, read, removeObserverMethods inherited from interface dev.prozilla.pine.common.property.Property
hasValue, hasValueProperty, isNull, map, snapshot, toStringProperty
-
Constructor Details
-
DeserializedIntProperty
public DeserializedIntProperty(FileDeserializer<Data> source, DeserializedIntProperty.ValueFactory<Data> valueFactory) -
DeserializedIntProperty
public DeserializedIntProperty(FileDeserializer<Data> source, DeserializedIntProperty.ValueFactory<Data> valueFactory, int fallbackValue)
-
-
Method Details
-
createValue
@Contract("null, _, _ -> param3") protected static <Data> int createValue(Data data, DeserializedIntProperty.ValueFactory<Data> valueFactory, int fallbackValue) Retrieves the value from a given source of data using a value factory.- Type Parameters:
Data- The type of data- Parameters:
data- The datavalueFactory- The value factoryfallbackValue- An optional fallback value, for when the data isnull- Returns:
- The value retrieved from the data
-