public interface IntUnaryOperator
| java.util.function.IntUnaryOperator |
表示对单个int值进行操作的操作数,它产生int值的结果。 这是针对int的UnaryOperator的原始类型专业化。
这是一个 functional interface,其功能方法是 applyAsInt(int) 。
也可以看看:
Public methods |
|
|---|---|
default IntUnaryOperator |
andThen(IntUnaryOperator after) 返回首先将此运算符应用于其输入的 |
abstract int |
applyAsInt(int operand) 将此运算符应用于给定的操作数。 |
default IntUnaryOperator |
compose(IntUnaryOperator before) 返回一个合成运算符,该运算符首先将 |
static IntUnaryOperator |
identity() 返回总是返回其输入参数的一元运算符。 |
IntUnaryOperator andThen (IntUnaryOperator after)
返回首先将此运算符应用于其输入的after运算符,然后将after运算符应用于结果。 如果对任何一个操作符的评估抛出一个异常,它将被转发给组合操作员的调用者。
| Parameters | |
|---|---|
after |
IntUnaryOperator: the operator to apply after this operator is applied |
| Returns | |
|---|---|
IntUnaryOperator |
a composed operator that first applies this operator and then applies the after operator |
| Throws | |
|---|---|
NullPointerException |
if after is null |
也可以看看:
int applyAsInt (int operand)
将此运算符应用于给定的操作数。
| Parameters | |
|---|---|
operand |
int: the operand |
| Returns | |
|---|---|
int |
the operator result |
IntUnaryOperator compose (IntUnaryOperator before)
返回一个合成运算符,该运算符首先将before运算符应用于其输入,然后将此运算符应用于结果。 如果对任何一个操作符的评估抛出一个异常,它将被转发给组合操作员的调用者。
| Parameters | |
|---|---|
before |
IntUnaryOperator: the operator to apply before this operator is applied |
| Returns | |
|---|---|
IntUnaryOperator |
a composed operator that first applies the before operator and then applies this operator |
| Throws | |
|---|---|
NullPointerException |
if before is null |
也可以看看:
IntUnaryOperator identity ()
返回总是返回其输入参数的一元运算符。
| Returns | |
|---|---|
IntUnaryOperator |
a unary operator that always returns its input argument |