Interface AttributeMapper<T>
-
- Type Parameters:
T
- the expected type of the mapped attribute
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface AttributeMapper<T>
An AttributeMapper maps / massages / transforms an attribute from anAttributeSource
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Optional<T>
map(AttributeSource attributeSource)
Map an attribute from the givenAttributeSource
-
-
-
Method Detail
-
map
@Nonnull java.util.Optional<T> map(@Nonnull AttributeSource attributeSource) throws AttributeMapperException
Map an attribute from the givenAttributeSource
- Parameters:
attributeSource
- theAttributeSource
- Returns:
- an
Optional
containing the mapped attribute or an emptyOptional
if the targeted attributed does not exist on theAttributeSource
- Throws:
AttributeMapperException
- if there is an unexpected problem mapping the attribute
-
-