BinaryOpNode


public final class BinaryOpNode extends ValueNode


A ValueNode that combines two other values with a binary operation.

Summary

Nested types

public final class BinaryOpNode.BinaryOp

A binary operation for combining two values in a BinaryOpNode.

Public constructors

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

Creates a BinaryOpNode that combines two other values with a binary operation.

Public methods

boolean
equals(Object other)
final @NonNull ValueNode

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

final @NonNull BinaryOpNode.BinaryOp

The binary operation to perform.

final @NonNull ValueNode

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

int
@NonNull String

Inherited methods

From androidx.ink.brush.behavior.Node
final @NonNull List<@NonNull ValueNode>

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

Public constructors

BinaryOpNode

Added in 1.1.0-alpha03
public BinaryOpNode(
    @NonNull BinaryOpNode.BinaryOp operation,
    @NonNull ValueNode firstInput,
    @NonNull ValueNode secondInput
)

Creates a BinaryOpNode that combines two other values with a binary operation.

Parameters
@NonNull BinaryOpNode.BinaryOp operation

the binary operation to perform

@NonNull ValueNode firstInput

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

@NonNull 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-alpha03
public final @NonNull ValueNode getFirstInput()

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

getOperation

Added in 1.1.0-alpha03
public final @NonNull BinaryOpNode.BinaryOp getOperation()

The binary operation to perform.

getSecondInput

Added in 1.1.0-alpha03
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()