Interface PropertyValue<T>

Type Parameters:
T - the value type
All Superinterfaces:
Consumer<T>, Observer<T>, Value<T>, ValueObserver<T>

public interface PropertyValue<T> extends Value<T>
A Value associated with a named property.
  • Method Details

    • propertyName

      String propertyName()
      Returns:
      the name of the property this value represents
    • getOrThrow

      T getOrThrow() throws IllegalStateException
      Returns the underlying value, if the value is null then a IllegalStateException is thrown.
      Returns:
      the value, if available
      Throws:
      IllegalStateException - in case the underlying value is null
    • getOrThrow

      T getOrThrow(String message) throws IllegalStateException
      Returns the underlying value, if the value is null then a IllegalStateException 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.