Interface ValueObserver<T>

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

public interface ValueObserver<T> extends Observer<T>
A read only value observer
  • Method Details

    • get

      T get()
      Returns:
      the value
    • optional

      default Optional<T> 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

      default boolean isEqualTo(T value)
      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

      default boolean isNotEqualTo(T value)
      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