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

tv.amwa.maj.io.mxf.impl

## Class DeltaEntryImpl

- java.lang.Object
- - tv.amwa.maj.io.mxf.impl.DeltaEntryImpl

- All Implemented Interfaces:
    Serializable, Cloneable, DeltaEntry, XMLSerializable

      public class DeltaEntryImpl
      extends Object
      implements DeltaEntry, Cloneable, Serializable, XMLSerializable

  Defines a byte offset value along an incrementing timeline as part of a delta entry array in an index table segment.

  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `DELTAENTRY_TAG`

    - ### Fields inherited from interface tv.amwa.maj.io.mxf.DeltaEntry

      `APPLY_TEMPORAL_REORDERING, NO_TEMPORAL_REORDERING, POSTABLEINDEX_DEFAULT, SLICE_DEFAULT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DeltaEntryImpl()`
    `DeltaEntryImpl(byte posTableIndex, byte slice, int elementDelta)`
    `DeltaEntryImpl(int elementDelta)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `appendXMLChildren(Node parent)` Append extra child elements to the given parent node to serialize the value of an object to an XML fragment.
    `DeltaEntry` | `clone()` Create a cloned copy of this DeltaEntryImpl.
    `boolean` | `equals(Object o)`
    `String` | `getComment()` Include a comment when serializing a value to XML.
    `int` | `getElementDelta()` Create a cloned copy of this DeltaEntryImpl.
    `byte` | `getPosTableIndex()` Create a cloned copy of this DeltaEntryImpl.
    `byte` | `getSlice()` Create a cloned copy of this DeltaEntryImpl.
    `int` | `hashCode()`
    `static DeltaEntry[]` | `makeDeltaEntryArray(int[] elementDeltas)`
    `static DeltaEntry` | `parseFactory(String deltaEntryString)`
    `void` | `setElementDelta(int elementDelta)` Create a cloned copy of this DeltaEntryImpl.
    `void` | `setPosTableIndex(byte posTableIndex)` Create a cloned copy of this DeltaEntryImpl.
    `void` | `setSlice(byte slice)` Create a cloned copy of this DeltaEntryImpl.
    `String` | `toString()`

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

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

- - ### Field Detail

    - #### DELTAENTRY_TAG

          public static final String DELTAENTRY_TAG

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### DeltaEntryImpl

          public DeltaEntryImpl()

    - #### DeltaEntryImpl

          public DeltaEntryImpl(@UInt32
                                int elementDelta)
                         throws IllegalArgumentException

      Throws:
        `IllegalArgumentException`

    - #### DeltaEntryImpl

          public DeltaEntryImpl(@Int8
                                byte posTableIndex,
                                @UInt8
                                byte slice,
                                @UInt32
                                int elementDelta)
                         throws IllegalArgumentException

      Throws:
        `IllegalArgumentException`

  - ### Method Detail

    - #### makeDeltaEntryArray

          public static final DeltaEntry[] makeDeltaEntryArray(@UInt32Array
                                                               int[] elementDeltas)
                                                        throws NullPointerException,
                                                               IllegalArgumentException

      Throws:
        `NullPointerException`
        `IllegalArgumentException`

    - #### getPosTableIndex

          @Int8
          public byte getPosTableIndex()

      Create a cloned copy of this DeltaEntryImpl.

      Specified by:
        `getPosTableIndex` in interface `DeltaEntry`
      Returns:
        Cloned copy of this DeltaEntryImpl.
      See Also:
        `DeltaEntry.POSTABLEINDEX_DEFAULT`, `DeltaEntry.APPLY_TEMPORAL_REORDERING`, `DeltaEntry.NO_TEMPORAL_REORDERING`

    - #### setPosTableIndex

          @UInt8
          public void setPosTableIndex(@UInt8
                                              byte posTableIndex)
                                       throws IllegalArgumentException

      Create a cloned copy of this DeltaEntryImpl.

      Specified by:
        `setPosTableIndex` in interface `DeltaEntry`
      Parameters:
        `posTableIndex` - If and how the element is subject to temporal reordering.
      Throws:
        `IllegalArgumentException` - The position table index cannot be less than -1.
      See Also:
        `DeltaEntry.POSTABLEINDEX_DEFAULT`, `DeltaEntry.APPLY_TEMPORAL_REORDERING`, `DeltaEntry.NO_TEMPORAL_REORDERING`

    - #### getSlice

          @UInt8
          public byte getSlice()

      Create a cloned copy of this DeltaEntryImpl.

      Specified by:
        `getSlice` in interface `DeltaEntry`
      Returns:
        Cloned copy of this DeltaEntryImpl.
      See Also:
        `DeltaEntry.SLICE_DEFAULT`, `IndexEntry.getSliceOffset()`

    - #### setSlice

          public void setSlice(@UInt8
                               byte slice)
                        throws IllegalArgumentException

      Create a cloned copy of this DeltaEntryImpl.

      Specified by:
        `setSlice` in interface `DeltaEntry`
      Parameters:
        `slice` - Slice number for the slice containing this delta entry.
      Throws:
        `IllegalArgumentException` - A slice number cannot be negative.
      See Also:
        `DeltaEntry.SLICE_DEFAULT`, `IndexEntry.setSliceOffset(int[])`

    - #### getElementDelta

          @UInt32
          public int getElementDelta()

      Create a cloned copy of this DeltaEntryImpl.

      Specified by:
        `getElementDelta` in interface `DeltaEntry`
      Returns:
        Cloned copy of this DeltaEntryImpl.
      See Also:
        `DeltaEntry.getSlice()`

    - #### setElementDelta

          public void setElementDelta(@UInt32
                                      int elementDelta)
                               throws IllegalArgumentException

      Create a cloned copy of this DeltaEntryImpl.

      Specified by:
        `setElementDelta` in interface `DeltaEntry`
      Parameters:
        `elementDelta` - Offset measured in bytes from the start of the start of the indexed element and the start of the current slice.
      Throws:
        `IllegalArgumentException` - Cannot set the element delta to a negative value.
      See Also:
        `DeltaEntry.getSlice()`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### clone

          public DeltaEntry clone()

      Create a cloned copy of this DeltaEntryImpl.

      Specified by:
        `clone` in interface `DeltaEntry`
      Overrides:
        `clone` in class `Object`
      Returns:
        Cloned copy of this DeltaEntryImpl.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### appendXMLChildren

          public void appendXMLChildren(Node parent)

      Description copied from interface: `XMLSerializable`

      Append extra child elements to the given parent node to serialize the value of an object to an XML fragment. Methods of the `XMLBuilder` class are provided to help with this process.

      Specified by:
        `appendXMLChildren` in interface `XMLSerializable`
      Parameters:
        `parent` - XML parent element to append child nodes to.

    - #### parseFactory

          public static final DeltaEntry parseFactory(String deltaEntryString)
                                               throws NullPointerException,
                                                      ParseException

      Throws:
        `NullPointerException`
        `ParseException`

    - #### getComment

          public String getComment()

      Description copied from interface: `XMLSerializable`

      Include a comment when serializing a value to XML. The comment will be inserted as the first child node of the element representing the class.

      Specified by:
        `getComment` in interface `XMLSerializable`
      Returns:
        Comment to add as the first child node of the element representing this class.

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