Example usage for java.util.function LongUnaryOperator compose

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

Introduction

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

Prototype

default LongUnaryOperator compose(LongUnaryOperator before) 

Source Link

Document

Returns a composed operator that first applies the before operator to its input, and then applies this 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.compose(j).applyAsLong(Long.MAX_VALUE));
}