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

tv.amwa.maj.union.impl

## Class MultiResultItemImpl

- java.lang.Object
- - tv.amwa.maj.union.impl.MultiResultItemImpl

- All Implemented Interfaces:
    Serializable, Cloneable, MultiResultItem

      public class MultiResultItemImpl
      extends Object
      implements MultiResultItem, Serializable, Cloneable

  Implementation of an element of an array containing multiple result values from an operation to read or write one or more channels from an interleaved data stream.

  Interleaved-essence: An essence format that combines two or more channels of audio or video data into a single essence stream.

  See Also:
    `EssenceMultiAccess`, `tv.amwa.maj.model.EssenceMultiAccess#readMultiSamples(tv.amwa.maj.record.MultiXferItem[])`, `tv.amwa.maj.model.EssenceMultiAccess#writeMultiSamples(tv.amwa.maj.record.MultiXferItem[])`, Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MultiResultItemImpl(int bytesXfered, int samplesXfered)` Create a multi-result value containing the number of bytes and number of samples transferred for a particular interleaved stream.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `MultiResultItemImpl` | `clone()`
    `boolean` | `equals(Object o)`
    `int` | `getBytesXfered()` Returns the total number of bytes transferred.
    `int` | `getSamplesXfered()` Returns the number of samples transferred.
    `int` | `hashCode()`
    `void` | `setBytesXfered(int bytesXfered)` Sets the total number of bytes transferred.
    `void` | `setSamplesXfered(int samplesXfered)` Sets the number of samples transferred.
    `String` | `toString()` Creates a pseudo-XML representation of this multi-result item.

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### MultiResultItemImpl

          public MultiResultItemImpl(@UInt32
                                     int bytesXfered,
                                     @UInt32
                                     int samplesXfered)
                              throws IllegalArgumentException

      Create a multi-result value containing the number of bytes and number of samples transferred for a particular interleaved stream.

      Parameters:
        `bytesXfered` - The total number of bytes transferred.
        `samplesXfered` - The total number of samples transferred.
      Throws:
        `IllegalArgumentException` - One or both of the given bytes or samples transferred values is negative.

  - ### Method Detail

    - #### getBytesXfered

          @UInt32
          public int getBytesXfered()

      Description copied from interface: `MultiResultItem`

      Returns the total number of bytes transferred.

      Specified by:
        `getBytesXfered` in interface `MultiResultItem`
      Returns:
        Total number of bytes transferred.

    - #### setBytesXfered

          public void setBytesXfered(@UInt32
                                     int bytesXfered)
                              throws IllegalArgumentException

      Description copied from interface: `MultiResultItem`

      Sets the total number of bytes transferred.

      Specified by:
        `setBytesXfered` in interface `MultiResultItem`
      Parameters:
        `bytesXfered` - Total number of bytes transferred.
      Throws:
        `IllegalArgumentException` - The given number of bytes transferred is negative.

    - #### getSamplesXfered

          @UInt32
          public int getSamplesXfered()

      Description copied from interface: `MultiResultItem`

      Returns the number of samples transferred.

      Specified by:
        `getSamplesXfered` in interface `MultiResultItem`
      Returns:
        Number of samples transferred.

    - #### setSamplesXfered

          public void setSamplesXfered(@UInt32
                                       int samplesXfered)
                                throws IllegalArgumentException

      Description copied from interface: `MultiResultItem`

      Sets the number of samples transferred.

      Specified by:
        `setSamplesXfered` in interface `MultiResultItem`
      Parameters:
        `samplesXfered` - Number of samples transferred.
      Throws:
        `IllegalArgumentException` - The given number of samples transferred is negative.

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### toString

          public String toString()

      Creates a pseudo-XML representation of this multi-result item. No XML schema or DTD defines this element. For example:

           <MultiResultItem bytesTransferred="65536" samplesTransferred="42"/>

      Overrides:
        `toString` in class `Object`
      Returns:
        XML representation of this multi-result item.

    - #### clone

          public MultiResultItemImpl clone()
                                    throws CloneNotSupportedException

      Overrides:
        `clone` in class `Object`
      Throws:
        `CloneNotSupportedException`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

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