Class NotNullProperty<T>
java.lang.Object
com.thecsdev.common.properties.ObjectProperty<T>
com.thecsdev.common.properties.NotNullProperty<T>
- Direct Known Subclasses:
PrimitiveProperty
Similar to
DefaultableProperty, except the default value is never
allowed to be null.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Tget()Returns the current value of thisObjectProperty.final TReturns the default value that is assigned when attempting to set the value tonull.Returns the current value of thisObjectPropertywrapped in anOptional.Methods inherited from class ObjectProperty
addChangeListener, addFilter, applyFilters, assertCallerIsOwner, getHandle, getInterceptor, getOwner, getReadOnly, isOwner, removeChangeListener, removeFilter, set, set, setHandle, setInterceptor, setOwner, setReadOnly
-
Constructor Details
-
NotNullProperty
-
NotNullProperty
-
-
Method Details
-
get
Description copied from class:ObjectPropertyReturns the current value of thisObjectProperty.- Overrides:
getin classObjectProperty<T>
-
getOptional
Description copied from class:ObjectPropertyReturns the current value of thisObjectPropertywrapped in anOptional.- Overrides:
getOptionalin classObjectProperty<T>
-
getDefaultValue
Returns the default value that is assigned when attempting to set the value tonull.
-