Stay organized with collections
Save and categorize content based on your preferences.
IntBinaryOperator
public
interface
IntBinaryOperator
java.util.function.IntBinaryOperator
|
Represents an operation upon two int
-valued operands and producing an
int
-valued result. This is the primitive type specialization of
BinaryOperator
for int
.
This is a functional interface
whose functional method is applyAsInt(int, int)
.
Summary
Public methods |
abstract
int
|
applyAsInt(int left, int right)
Applies this operator to the given operands.
|
Public methods
applyAsInt
public abstract int applyAsInt (int left,
int right)
Applies this operator to the given operands.
Parameters |
left |
int : the first operand |
right |
int : the second operand |
Returns |
int |
the operator result |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# IntBinaryOperator\n\nAdded in [API level 24](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nIntBinaryOperator\n=================\n\n\n`\npublic\n\n\ninterface\nIntBinaryOperator\n`\n\n\n`\n\n\n`\n\n|--------------------------------------|\n| java.util.function.IntBinaryOperator |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nRepresents an operation upon two `int`-valued operands and producing an\n`int`-valued result. This is the primitive type specialization of\n[BinaryOperator](/reference/java/util/function/BinaryOperator) for `int`.\n\nThis is a [functional interface](/reference/java/util/function/package-summary)\nwhose functional method is [applyAsInt(int, int)](/reference/java/util/function/IntBinaryOperator#applyAsInt(int,%20int)). \n**See also:**\n\n- [BinaryOperator](/reference/java/util/function/BinaryOperator)\n- [IntUnaryOperator](/reference/java/util/function/IntUnaryOperator)\n\nSummary\n-------\n\n| ### Public methods ||\n|-----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract int` | ` `[applyAsInt](/reference/java/util/function/IntBinaryOperator#applyAsInt(int,%20int))`(int left, int right) ` Applies this operator to the given operands. |\n\nPublic methods\n--------------\n\n### applyAsInt\n\nAdded in [API level 24](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract int applyAsInt (int left, \n int right)\n```\n\nApplies this operator to the given operands.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------|----------------------------------|\n| `left` | `int`: the first operand \u003cbr /\u003e |\n| `right` | `int`: the second operand \u003cbr /\u003e |\n\n| Returns ||\n|-------|----------------------------|\n| `int` | the operator result \u003cbr /\u003e |"]]