Package org.incendo.cloud.suggestion
Interface SuggestionMapper<S extends Suggestion>
- Type Parameters:
S- the suggestion type
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Maps from
Suggestion to SuggestionMapper.-
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull SuggestionMapper<Suggestion> identity()Returns a suggestion mapper that maps fromSuggestiontoSuggestion.map(@NonNull Suggestion suggestion) Maps the suggestion to the responding suggestion of typeSuggestionMapper.default <S1 extends Suggestion>
@NonNull SuggestionMapper<S1> then(@NonNull SuggestionMapper<S1> mapper) Returns a suggestion mapper that invokes this mapper first and then the provided one.
-
Method Details
-
identity
Returns a suggestion mapper that maps fromSuggestiontoSuggestion.- Returns:
- the identity mapper
-
map
Maps the suggestion to the responding suggestion of typeSuggestionMapper.- Parameters:
suggestion- the input suggestion- Returns:
- the output suggestion
-
then
default <S1 extends Suggestion> @NonNull SuggestionMapper<S1> then(@NonNull SuggestionMapper<S1> mapper) Returns a suggestion mapper that invokes this mapper first and then the provided one.- Type Parameters:
S1- mapped suggestion type- Parameters:
mapper- suggestion mapper- Returns:
- new mapper
-