Example usage for java.util.function BiFunction andThen

List of usage examples for java.util.function BiFunction andThen

Introduction

In this page you can find the example usage for java.util.function BiFunction andThen.

Prototype

default <V> BiFunction<T, U, V> andThen(Function<? super R, ? extends V> after) 

Source Link

Document

Returns a composed function that first applies this function to its input, and then applies the after function to the result.

Usage

From source file:Main.java

public static void main(String[] args) {
    BiFunction<String, String, String> bi = (x, y) -> {
        return x + y;
    };/*  ww w .ja  v  a2 s. com*/
    Function<String, String> f = x -> x + " new";

    System.out.println(bi.andThen(f).andThen(f).apply("java2s.com", " tutorial"));
}