Interface DerivedAttribute.SourceValues

Enclosing interface:
DerivedAttribute<T>

public static interface DerivedAttribute.SourceValues
Provides the source values from which to derive the value.
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> T
    get(Attribute<T> attribute)
    Returns the value associated with the given source attribute.
    <T> Optional<T>
    optional(Attribute<T> attribute)
    Returns the source value associated with the given attribute or an empty Optional if the associated value is null or if the given attribute is not a source attribute
  • Method Details

    • get

      <T> T get(Attribute<T> attribute)
      Returns the value associated with the given source attribute.
      Type Parameters:
      T - the value type
      Parameters:
      attribute - the source attribute which value to retrieve
      Returns:
      the value associated with the given source attribute
      Throws:
      IllegalArgumentException - in case the given attribute is not a source attribute
    • optional

      <T> Optional<T> optional(Attribute<T> attribute)
      Returns the source value associated with the given attribute or an empty Optional if the associated value is null or if the given attribute is not a source attribute
      Type Parameters:
      T - the value type
      Parameters:
      attribute - the attribute which value to retrieve
      Returns:
      the value associated with attribute