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 IntUnaryOperator

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

Methods

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

Method details

applyAsInt

public abstract int applyAsInt(int operand)
Applies this operator.

Parameters

operand int
the input

Returns

the result

compose

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

Parameters

before IntUnaryOperator
the operator applied first

Returns

the composed operator

andThen

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

Parameters

after IntUnaryOperator
the operator applied next

Returns

the composed operator

identity

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

Returns

the identity operator