ToolTypeFilterNode


public final class ToolTypeFilterNode extends ValueNode


A ValueNode for filtering out a branch of a behavior graph unless this stroke's tool type is in the specified set.

Summary

Public constructors

ToolTypeFilterNode(
    @NonNull Set<@NonNull InputToolType> enabledToolTypes,
    @NonNull ValueNode input
)

Creates a ToolTypeFilterNode that filters out a branch of a behavior graph unless this stroke's tool type is in the specified set.

Public methods

boolean
equals(Object other)
final @NonNull Set<@NonNull InputToolType>

The set of tool types that should be enabled.

final @NonNull ValueNode

The input node that produces the value filtered if the tool type is not enabled.

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

ToolTypeFilterNode

Added in 1.1.0-alpha04
public ToolTypeFilterNode(
    @NonNull Set<@NonNull InputToolType> enabledToolTypes,
    @NonNull ValueNode input
)

Creates a ToolTypeFilterNode that filters out a branch of a behavior graph unless this stroke's tool type is in the specified set.

Parameters
@NonNull Set<@NonNull InputToolType> enabledToolTypes

the set of tool types that should be enabled

@NonNull ValueNode input

input node that produces the value filtered if the tool type is not enabled

Public methods

equals

public boolean equals(Object other)

getEnabledToolTypes

Added in 1.1.0-alpha04
public final @NonNull Set<@NonNull InputToolTypegetEnabledToolTypes()

The set of tool types that should be enabled.

getInput

Added in 1.1.0-alpha04
public final @NonNull ValueNode getInput()

The input node that produces the value filtered if the tool type is not enabled.

hashCode

public int hashCode()

toString

public @NonNull String toString()