Interface ValueObserver<T>

Type Parameters:
T - the type of the value
All Superinterfaces:
EventObserver<T>, Supplier<T>
All Known Subinterfaces:
ComponentValue<T,C>, 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 EventObserver<T>, Supplier<T>
A read only value observer
  • Method Details

    • 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.
    • isNullable

      boolean isNullable()
      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