public interface Joinable<D,R> extends Function<D,R>
Function<Person, String> nameProvider = Joinable
.of (Person::getBoss)
.add(Person::getBoss)
.add(Person::getName);
String superBossName = nameProvider.apply(getPerson());
| Modifier and Type | Method and Description |
|---|---|
default <F> @Nullable Joinable<D,F> |
add(@NotNull Joinable<R,F> next)
Send a result of the first function to the next one.
|
R |
apply(D d)
Applies this function to the given argument.
|
static <D,R> @NotNull Joinable<D,R> |
of(@NotNull Function<D,R> fce)
Create a joinable function
|
@Nullable default <F> @Nullable Joinable<D,F> add(@NotNull @NotNull Joinable<R,F> next)
F - A final result typenext - Next functionnull than the final result is null too.Copyright 2015, Pavel Ponec