- Type Parameters:
T
- the type of the value
- All Superinterfaces:
Observer<T>
- All Known Subinterfaces:
ComponentValue<T,
,C> EntityEditModel.EditableEntity.Exists
,EntityEditModel.EditableEntity.Modified
,EntityEditModel.EditableValue<T>
,PropertyValue<T>
,State
,State.Combination
,StateObserver
,Value<T>
,ValueList<T>
,ValueListObserver<T>
,Values<T,
,C> ValueSet<T>
,ValueSetObserver<T>
,ValuesObserver<T,
C>
- All Known Implementing Classes:
AbstractComponentValue
,AbstractTextComponentValue
,AbstractValue
A read only value observer
-
Method Summary
Modifier and TypeMethodDescriptionget()
default boolean
Returns true if the underlying value is equal to the given one.default boolean
isNotEqualTo
(T value) Returns true if the underlying value is NOT equal to the given one.default boolean
default boolean
isNull()
boolean
nullable()
If false then get() is guaranteed to never return null.optional()
Methods inherited from interface is.codion.common.observer.Observer
addConsumer, addListener, addWeakConsumer, addWeakListener, removeConsumer, removeListener, removeWeakConsumer, removeWeakListener
-
Method Details
-
get
T get()- Returns:
- the value
-
optional
- Returns:
- an
Optional
wrapping this value.
-
isNull
default boolean isNull()- Returns:
- true if the underlying value is null.
-
isNotNull
default boolean isNotNull()- Returns:
- true if the underlying value is not null.
-
nullable
boolean nullable()If false then get() is guaranteed to never return null.- Returns:
- true if this value can be null
-
isEqualTo
Returns true if the underlying value is equal to the given one. Note that null == null.- Parameters:
value
- the value- Returns:
- true if the underlying value is equal to the given one
-
isNotEqualTo
Returns true if the underlying value is NOT equal to the given one. Note that null == null.- Parameters:
value
- the value- Returns:
- true if the underlying value is NOT equal to the given one
-