Example usage for java.util.function LongUnaryOperator andThen

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

Introduction

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

Prototype

default LongUnaryOperator andThen(LongUnaryOperator 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) {
    LongUnaryOperator i = (l) -> -l;

    LongUnaryOperator j = (l) -> l / 2;

    System.out.println(i.andThen(j).applyAsLong(Long.MAX_VALUE));
}