T
- the expected type of the mapped attribute@FunctionalInterface
public interface AttributeMapper<T>
AttributeSource
Modifier and Type | Method and Description |
---|---|
java.util.Optional<T> |
map(AttributeSource attributeSource)
Map an attribute from the given
AttributeSource |
@Nonnull java.util.Optional<T> map(@Nonnull AttributeSource attributeSource) throws AttributeMapperException
AttributeSource
attributeSource
- the AttributeSource
Optional
containing the mapped attribute or an empty Optional
if the targeted
attributed does not exist on the AttributeSource
AttributeMapperException
- if there is an unexpected problem mapping the attribute