Package net.paulhertz.pixelaudio.granular

# Class GestureEventParams.Builder

java.lang.Object
net.paulhertz.pixelaudio.granular.GestureEventParams.Builder

Enclosing class:
  GestureEventParams

public static final class GestureEventParams.Builder extends Object

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `private boolean`
  `copyArrays`
  `private float[]`
  `gain`
  `private final int`
  `n`
  `private float[]`
  `pan`
  `private float[]`
  `pitchRatio`
  `private int`
  `scheduleId`
  `private int[]`
  `startIndices`
  `private int`
  `version`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `private`
  `Builder(int n)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `GestureEventParams`
  `build()`
  `GestureEventParams.Builder`
  `gain(float[] v)`
  Optional.
  `GestureEventParams.Builder`
  `noCopy()`
  By default, build() defensively copies arrays.
  `GestureEventParams.Builder`
  `pan(float[] v)`
  Optional.
  `GestureEventParams.Builder`
  `pitchRatio(float[] v)`
  Optional.
  `private static void`
  `requireLen(String name, int got, int expect)`
  `GestureEventParams.Builder`
  `scheduleId(int v)`
  Optional caller-defined id for associated schedule.
  `GestureEventParams.Builder`
  `startIndices(int[] v)`
  Required.
  `GestureEventParams.Builder`
  `version(int v)`
  Optional caller-defined tag/version.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### n

    private final int n

  - ### startIndices

    private int[] startIndices

  - ### pan

    private float[] pan

  - ### gain

    private float[] gain

  - ### pitchRatio

    private float[] pitchRatio

  - ### version

    private int version

  - ### scheduleId

    private int scheduleId

  - ### copyArrays

    private boolean copyArrays

- ## Constructor Details

  - ### Builder

    private Builder(int n)

- ## Method Details

  - ### noCopy

    public GestureEventParams.Builder noCopy()
    By default, build() defensively copies arrays. Call this to keep references as-is. Only do this if you treat the arrays as immutable after building.

  - ### startIndices

    public GestureEventParams.Builder startIndices(int[] v)
    Required. Length must equal n.

  - ### pan

    public GestureEventParams.Builder pan(float[] v)
    Optional. If non-null, length must equal n.

  - ### gain

    public GestureEventParams.Builder gain(float[] v)
    Optional. If non-null, length must equal n.

  - ### pitchRatio

    public GestureEventParams.Builder pitchRatio(float[] v)
    Optional. If non-null, length must equal n.

  - ### version

    public GestureEventParams.Builder version(int v)
    Optional caller-defined tag/version.

  - ### scheduleId

    public GestureEventParams.Builder scheduleId(int v)
    Optional caller-defined id for associated schedule.

  - ### build

    public GestureEventParams build()

  - ### requireLen

    private static void requireLen(String name, int got, int expect)