VaryingValue (Media Authoring with Java API)
Date: 2016-02-05

tv.amwa.maj.model

## Interface VaryingValue

- All Superinterfaces:
    InterchangeObject, MediaEntity, MetadataObject, Parameter
  All Known Implementing Classes:
    VaryingValueImpl

      public interface VaryingValue
      extends Parameter

  Specifies a changing data value for an effect control value.

  See Also:
    `OperationGroup.addParameter(Parameter)`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `appendControlPoint(ControlPoint controlPoint)` Adds a control point to the sequence of control points of this varying value, each of which specifies a value and a time point at which the value is defined.
    `VaryingValue` | `clone()` Create a cloned copy of this varying value.
    `int` | `countControlPoints()` Returns the number of control points in the sequence of control points of this varying value, each of which specifies a value and a time point at which the value is defined.
    `ControlPoint` | `getControlPointAt(int index)` Retrieves the input control point at the given index in the sequence of control points of this varying value, each of which specifies a value and a time point at which the value is defined.
    `List<? extends ControlPoint>` | `getControlPoints()` Returns the sequence of control points of this varying value, each of which specifies a value and a time point at which the value is defined.
    `Object` | `getInterpolatedValue(Rational inputValue)` Returns the interpolated value of the varying value at a given time position, which should be a value between 0 and 1 inclusive.
    `InterpolationDefinition` | `getInterpolationDefinition()` Returns the interpolation property of this varying value, which specifies the kind of interpolation to be used to find the value between control points.
    `void` | `removeControlPointAt(int index)` This function removes the input control point at the given index in the sequence of control points of this varying value, each of which specifies a value and a time point at which the value is defined.

    - ### Methods inherited from interface tv.amwa.maj.model.Parameter

      `getParameterDefinition, getParameterDefinitionReference, getTypeDefinition`

    - ### Methods inherited from interface tv.amwa.maj.model.InterchangeObject

      `addApplicationPlugin, clearApplicationPlugins, containsApplicationPlugin, containsApplicationPlugin, countApplicationPlugins, deepEquals, disableGenerationTracking, enableGenerationTracking, equals, getApplicationPlugins, getGeneration, getLinkedGenerationID, getObjectClass, isGenerationTracked, removeApplicationPlugin, removeApplicationPlugin, setLinkedGenerationID, setObjectClass, toString`

    - ### Methods inherited from interface tv.amwa.maj.industry.MediaEntity

      `getPersistentID, setPersistentIndex`

- - ### Method Detail

    - #### appendControlPoint

          void appendControlPoint(ControlPoint controlPoint)
                           throws NullPointerException

      Adds a control point to the sequence of control points of this varying value, each of which specifies a value and a time point at which the value is defined. The point will be sorted by time order, not the order that the points were added in.

      Parameters:
        `controlPoint` - Control point to add to the sequence of control points.
      Throws:
        `NullPointerException` - The given control point is `null`.

    - #### getControlPoints

          List<? extends ControlPoint> getControlPoints()

      Returns the sequence of control points of this varying value, each of which specifies a value and a time point at which the value is defined.

      Returns:
        Shallow copy of the sequence of control points of this varying value.
      See Also:
        `TypeDefinitions.ControlPointStrongReferenceVector`

    - #### countControlPoints

          @UInt32
          int countControlPoints()

      Returns the number of control points in the sequence of control points of this varying value, each of which specifies a value and a time point at which the value is defined.

      Returns:
        Number of control points in the sequence of control points of the varying value.

    - #### getControlPointAt

          ControlPoint getControlPointAt(@UInt32
                                         int index)
                                  throws IndexOutOfBoundsException

      Retrieves the input control point at the given index in the sequence of control points of this varying value, each of which specifies a value and a time point at which the value is defined.

      Parameters:
        `index` - 0-based index of the control point to retrieve.
      Returns:
        Input control point at the given index in the sequence of control points of this varying value.
      Throws:
        `IndexOutOfBoundsException` - The given index is outside the acceptable range for the current sequence of control points of this varying value.

    - #### removeControlPointAt

          void removeControlPointAt(@UInt32
                                    int index)
                             throws IndexOutOfBoundsException

      This function removes the input control point at the given index in the sequence of control points of this varying value, each of which specifies a value and a time point at which the value is defined. Control points already existing at indices higher than the given index will be moved to the next lower index to accommodate.

      Parameters:
        `index` - Index of control point to remove from the sequence.
      Throws:
        `IndexOutOfBoundsException` - The index is outside acceptable range for the current sequence of control points of this varying value.

    - #### getInterpolationDefinition

          InterpolationDefinition getInterpolationDefinition()

      Returns the interpolation property of this varying value, which specifies the kind of interpolation to be used to find the value between control points.

      Returns:
        Interpolation definition referenced by this varying value.
      See Also:
        `getInterpolatedValue(Rational)`, `InterpolationConstant`, `TypeDefinitions.InterpolationDefinitionWeakReference`

    - #### getInterpolatedValue

          Object getInterpolatedValue(Rational inputValue)
                               throws NullPointerException

      Returns the interpolated value of the varying value at a given time position, which should be a value between 0 and 1 inclusive. The data type of the value contained in the value returned will be the same as the data type of the parameter this varying value provides a value for, which is the same as the data type of all of the control points.

      Parameters:
        `inputValue` - Time position along the operation group to find the interpolated value for.
      Returns:
        Buffer containing the interpolated value of the varying value at a given position.
      Throws:
        `NullPointerException` - The given input value is `null`.
      See Also:
        `getInterpolationDefinition()`, `InterpolationConstant`, `Parameter.getTypeDefinition()`, `ControlPoint.getTypeDefinition()`, `TypeDefinition.createValue(Object)`, `PropertyValue.getValue()`

    - #### clone

          VaryingValue clone()

      Create a cloned copy of this varying value.

      Specified by:
        `clone` in interface `InterchangeObject`
      Specified by:
        `clone` in interface `MediaEntity`
      Specified by:
        `clone` in interface `Parameter`
      Returns:
        Cloned copy of this varying value.

(c)2007-2016 Richard Cartwright, all rights reserved. Licensed under Apache 2 license and subject to the AMWA IPR policy.