IntegralNode


public final class IntegralNode extends ValueNode


A ValueNode that integrates an input value over time or distance.

Summary

Public constructors

IntegralNode(
    @NonNull ProgressDomain integrateOver,
    float integralValueRangeStart,
    float integralValueRangeEnd,
    @NonNull OutOfRange integralOutOfRangeBehavior,
    @NonNull ValueNode input
)

Creates an IntegralNode that integrates over an input value.

Public methods

boolean
equals(Object other)
final @NonNull ValueNode

The input node that produces the value to be integrated.

final @NonNull OutOfRange

The behavior to use if the integral produces a value outside the specified range.

final float

The end of the range of values that the integral can produce.

final float

The start of the range of values that the integral can produce.

final @NonNull ProgressDomain

The metric to integrate the input over.

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

IntegralNode

Added in 1.1.0-alpha03
public IntegralNode(
    @NonNull ProgressDomain integrateOver,
    float integralValueRangeStart,
    float integralValueRangeEnd,
    @NonNull OutOfRange integralOutOfRangeBehavior,
    @NonNull ValueNode input
)

Creates an IntegralNode that integrates over an input value.

If integrateOver is ProgressDomain.DISTANCE_IN_CENTIMETERS and the stroke input data does not indicate the relationship between stroke units and physical units (e.g. as may be the case for programmatically-generated inputs), then the output value will be null regardless of the input.

Parameters
@NonNull ProgressDomain integrateOver

the metric to integrate the input over

float integralValueRangeStart

the start of the range of values that the integral can produce

float integralValueRangeEnd

the end of the range of values that the integral can produce

@NonNull OutOfRange integralOutOfRangeBehavior

the behavior to use if the integral produces a value outside the specified range

@NonNull ValueNode input

input node that produces the value to be integrated

Public methods

equals

public boolean equals(Object other)

getInput

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

The input node that produces the value to be integrated.

getIntegralOutOfRangeBehavior

Added in 1.1.0-alpha03
public final @NonNull OutOfRange getIntegralOutOfRangeBehavior()

The behavior to use if the integral produces a value outside the specified range.

getIntegralValueRangeEnd

Added in 1.1.0-alpha03
public final float getIntegralValueRangeEnd()

The end of the range of values that the integral can produce.

getIntegralValueRangeStart

Added in 1.1.0-alpha03
public final float getIntegralValueRangeStart()

The start of the range of values that the integral can produce.

getIntegrateOver

Added in 1.1.0-alpha03
public final @NonNull ProgressDomain getIntegrateOver()

The metric to integrate the input over.

hashCode

public int hashCode()

toString

public @NonNull String toString()