Client and backend. This class is shared: the same code is compiled into your app and into your server, so everything on this page works in both.

@FunctionalInterface

public interface LongUnaryOperator

An operation on one long that answers a long; the long form of UnaryOperator.

Methods

public abstract long applyAsLong(long operand)Applies this operator.
public default LongUnaryOperator compose(LongUnaryOperator before)before, then this operator on its result.
public default LongUnaryOperator andThen(LongUnaryOperator after)This operator, then after on its result.
public static LongUnaryOperator identity()The operator that answers its operand.

Method details

applyAsLong

public abstract long applyAsLong(long operand)
Applies this operator.

Parameters

operand long
the input

Returns

the result

compose

public default LongUnaryOperator compose(LongUnaryOperator before)
before, then this operator on its result.

Parameters

before LongUnaryOperator
the operator applied first

Returns

the composed operator

andThen

public default LongUnaryOperator andThen(LongUnaryOperator after)
This operator, then after on its result.

Parameters

after LongUnaryOperator
the operator applied next

Returns

the composed operator

identity

public static LongUnaryOperator identity()
The operator that answers its operand.

Returns

the identity operator