- Type Parameters:
T
- the value type
- All Superinterfaces:
Consumer<T>
,Observer<T>
,Value<T>
,ValueObserver<T>
A Value associated with a named property.
-
Nested Class Summary
Nested classes/interfaces inherited from interface is.codion.common.value.Value
Value.Builder<T,
B extends Value.Builder<T, B>>, Value.BuilderFactory, Value.Notify, Value.Validator<T> -
Method Summary
Modifier and TypeMethodDescriptionReturns the underlying value, if the value is null then aIllegalStateException
is thrown.getOrThrow
(String message) Returns the underlying value, if the value is null then aIllegalStateException
is thrown.void
remove()
Sets this value to null as well as removing it from the underlying store and clearing the system property.Methods inherited from interface is.codion.common.observer.Observer
addConsumer, addListener, addWeakConsumer, addWeakListener, removeConsumer, removeListener, removeWeakConsumer, removeWeakListener
Methods inherited from interface is.codion.common.value.Value
accept, addValidator, clear, link, link, map, observer, removeValidator, set, unlink, unlink, validate
Methods inherited from interface is.codion.common.value.ValueObserver
get, isEqualTo, isNotEqualTo, isNotNull, isNull, nullable, optional
-
Method Details
-
propertyName
String propertyName()- Returns:
- the name of the property this value represents
-
getOrThrow
Returns the underlying value, if the value is null then aIllegalStateException
is thrown.- Returns:
- the value, if available
- Throws:
IllegalStateException
- in case the underlying value is null
-
getOrThrow
Returns the underlying value, if the value is null then aIllegalStateException
is thrown.- Parameters:
message
- the error message to use when throwing- Returns:
- the value, if available
- Throws:
IllegalStateException
- in case the underlying value is null
-
remove
void remove()Sets this value to null as well as removing it from the underlying store and clearing the system property.
-