# BinaryOpNode

Artifact: [androidx.ink:ink-brush](https://developer.android.com/jetpack/androidx/releases/ink) [View Source](https://cs.android.com/search?q=file:androidx/ink/brush/behavior/BinaryOpNode.kt+class:androidx.ink.brush.behavior.BinaryOpNode) Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

*** ** * ** ***


```
public final class BinaryOpNode extends ValueNode
```

<br />

|---|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||||
| ↳ | [androidx.ink.brush.behavior.Node](https://developer.android.com/reference/androidx/ink/brush/behavior/Node) |||
|   | ↳ | [androidx.ink.brush.behavior.ValueNode](https://developer.android.com/reference/androidx/ink/brush/behavior/ValueNode) ||
|   |   | ↳ | [androidx.ink.brush.behavior.BinaryOpNode](https://developer.android.com/reference/androidx/ink/brush/behavior/BinaryOpNode) |

*** ** * ** ***

A `https://developer.android.com/reference/androidx/ink/brush/behavior/ValueNode` that combines two other values with a binary operation.

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/ink/brush/behavior/BinaryOpNode.BinaryOp` A binary operation for combining two values in a `https://developer.android.com/reference/androidx/ink/brush/behavior/BinaryOpNode`. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/ink/brush/behavior/BinaryOpNode#BinaryOpNode(androidx.ink.brush.behavior.BinaryOpNode.BinaryOp,androidx.ink.brush.behavior.ValueNode,androidx.ink.brush.behavior.ValueNode)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/behavior/BinaryOpNode.BinaryOp operation, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/behavior/ValueNode firstInput, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/behavior/ValueNode secondInput )` Creates a `https://developer.android.com/reference/androidx/ink/brush/behavior/BinaryOpNode` that combines two other values with a binary operation. |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/ink/brush/behavior/BinaryOpNode#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/behavior/ValueNode` | `https://developer.android.com/reference/androidx/ink/brush/behavior/BinaryOpNode#getFirstInput()()` The input node that produces the first value used in the binary operation. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/behavior/BinaryOpNode.BinaryOp` | `https://developer.android.com/reference/androidx/ink/brush/behavior/BinaryOpNode#getOperation()()` The binary operation to perform. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/behavior/ValueNode` | `https://developer.android.com/reference/androidx/ink/brush/behavior/BinaryOpNode#getSecondInput()()` The input node that produces the second value used in the binary operation. |
| `int` | `https://developer.android.com/reference/androidx/ink/brush/behavior/BinaryOpNode#hashCode()()` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/ink/brush/behavior/BinaryOpNode#toString()()` |

### Inherited methods

From [androidx.ink.brush.behavior.Node](https://developer.android.com/reference/androidx/ink/brush/behavior/Node) `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/Version` `https://developer.android.com/reference/androidx/ink/brush/behavior/Node#calculateMinimumRequiredVersion()()`

Returns the minimum required `https://developer.android.com/reference/androidx/ink/brush/Version` for this `https://developer.android.com/reference/androidx/ink/brush/behavior/Node`.
`final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/behavior/ValueNode>` `https://developer.android.com/reference/androidx/ink/brush/behavior/Node#getInputs()()`

The ordered list of inputs that this node directly depends on.

## Public constructors

### BinaryOpNode

Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

```
public BinaryOpNode(
    @NonNull BinaryOpNode.BinaryOp operation,
    @NonNull ValueNode firstInput,
    @NonNull ValueNode secondInput
)
```

Creates a `https://developer.android.com/reference/androidx/ink/brush/behavior/BinaryOpNode` that combines two other values with a binary operation.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/behavior/BinaryOpNode.BinaryOp operation` | the binary operation to perform |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/behavior/ValueNode firstInput` | input node that produces the first value used in the binary operation |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/ink/brush/behavior/ValueNode secondInput` | input node that produces the second value used in the binary operation |

## Public methods

### equals

```
public boolean equals(Object other)
```

### getFirstInput

Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

```
public final @NonNull ValueNode getFirstInput()
```

The input node that produces the first value used in the binary operation.

### getOperation

Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

```
public final @NonNull BinaryOpNode.BinaryOp getOperation()
```

The binary operation to perform.

### getSecondInput

Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

```
public final @NonNull ValueNode getSecondInput()
```

The input node that produces the second value used in the binary operation.

### hashCode

```
public int hashCode()
```

### toString

```
public @NonNull String toString()
```