Interface ValueAccessor<V>

  • Type Parameters:
    V - The type of the value to be used.
    All Known Subinterfaces:
    ValueAccessor.ValueProperty<V>


    public interface ValueAccessor<V>
    Provides access to a value property for e.g. key/value-pair.
    • Method Detail

      • getValue

        V getValue​()
        Retrieves the value from the value property.
        Returns:
        The value stored by the value property.
      • getValueOr

        default V getValueOr​(V aValue)
        Retrieves the value from the value property. If there is no value for the property, then the provided value is returned. Depending on the implementation, not present might mean null or empty as well (being "" for a String).
        Parameters:
        aValue - In case the value to be retrieved is null, then the
        Returns:
        The value stored by the value property.