Example usage for java.util.function IntUnaryOperator andThen

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

Introduction

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

Prototype

default IntUnaryOperator andThen(IntUnaryOperator after) 

Source Link

Document

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

Usage

From source file:Main.java

public static void main(String[] args) {
    IntUnaryOperator i = (x) -> x * x;
    System.out.println(i.andThen(i).applyAsInt(2));
}