Example usage for java.util.function LongUnaryOperator identity

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

Introduction

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

Prototype

static LongUnaryOperator identity() 

Source Link

Document

Returns a unary operator that always returns its input argument.

Usage

From source file:Main.java

public static void main(String[] args) {
    LongUnaryOperator i = LongUnaryOperator.identity();

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

From source file:org.briljantframework.array.AbstractLongArray.java

@Override
public long reduce(long identity, LongBinaryOperator reduce) {
    return reduce(identity, reduce, LongUnaryOperator.identity());
}