Example usage for java.util.function LongFunction apply

List of usage examples for java.util.function LongFunction apply

Introduction

In this page you can find the example usage for java.util.function LongFunction apply.

Prototype

R apply(long value);

Source Link

Document

Applies this function to the given argument.

Usage

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

@Override
public <T> Array<T> mapToObj(LongFunction<? extends T> mapper) {
    Array<T> array = getArrayFactory().newArray(getShape());
    for (int i = 0; i < size(); i++) {
        array.set(i, mapper.apply(get(i)));
    }/*from ww  w .  ja  v a2  s  .  com*/
    return array;
}