Interface NonNullProperty<T>
- All Known Subinterfaces:
BooleanProperty,FloatProperty,IntProperty,MutableBooleanProperty,MutableFloatProperty,MutableIntProperty,ObservableBooleanProperty,ObservableFloatProperty,ObservableIntProperty
- All Known Implementing Classes:
AdaptiveFloatProperty,AdaptiveIntProperty,AnimatedFloatProperty,AnimatedIntProperty,BooleanConfigOption,DelegatedVector2fProperty,DelegatedVector2fPropertyBase,DelegatedVector3fProperty,DelegatedVector3fPropertyBase,DelegatedVector4fProperty,DelegatedVector4fPropertyBase,DeserializedBooleanProperty,DeserializedFloatProperty,DeserializedIntProperty,FixedBooleanProperty,FixedFloatProperty,FixedIntProperty,FloatConfigOption,IntConfigOption,LocalRandomBooleanProperty,LocalRandomFloatProperty,LocalRandomIntProperty,RandomBooleanProperty,RandomFloatProperty,RandomIntProperty,RangedMutableIntProperty,SimpleMutableBooleanProperty,SimpleMutableFloatProperty,SimpleMutableIntProperty,SimpleObservableBooleanProperty,SimpleObservableFloatProperty,SimpleObservableIntProperty,StoredBooleanProperty,StoredFloatProperty,StoredIntProperty,StyledIntProperty,TransitionedFloatProperty,TransitionedIntProperty
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A property whose value is never
null.-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanReturnstrue, because the value of this property is nevernull.default FixedBooleanPropertyReturns a boolean property whose value is alwaystrue.default NonNullProperty<T> replaceNull(T defaultValue) Returns this property, whose value is nevernull.Methods inherited from interface dev.prozilla.pine.common.property.Property
getValue, getValueOr, hasValue, hasValueProperty, isNull, map, requireValue, snapshot, toStringProperty
-
Method Details
-
replaceNull
Returns this property, whose value is nevernull.- Specified by:
replaceNullin interfaceProperty<T>- Returns:
- This property.
-
isNotNull
@Contract("-> true") default boolean isNotNull()Returnstrue, because the value of this property is nevernull. -
isNotNullProperty
Returns a boolean property whose value is alwaystrue.- Specified by:
isNotNullPropertyin interfaceProperty<T>- Returns:
BooleanProperty.TRUE- See Also:
-