Example usage for java.util.function BiConsumer andThen

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

Introduction

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

Prototype

default BiConsumer<T, U> andThen(BiConsumer<? super T, ? super U> after) 

Source Link

Document

Returns a composed BiConsumer that performs, in sequence, this operation followed by the after operation.

Usage

From source file:Main.java

public static void main(String[] args) {
    BiConsumer<String, String> biConsumer = (x, y) -> {
        System.out.println(x);//ww w.j a  v  a 2  s. c o m
        System.out.println(y);
    };

    biConsumer.andThen(biConsumer).accept("java2s.com", " tutorial");
}