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

tv.amwa.maj.industry

## Class WeakReferenceVector<T extends WeakReferenceTarget>

- java.lang.Object
- - tv.amwa.maj.industry.WeakReferenceVector<T>

- Type Parameters:
    `T` - Type of the target of all elements of the array (vector).

      public class WeakReferenceVector<T extends WeakReferenceTarget>
      extends Object

  Represents a variable array (vector) of weak references and provides a means to resolve them at runtime. The class provides a consistent set of delegate append, prepend, get, contains and remove methods for weak reference vector type properties.

  If the array of references is persisted via an object relational mapping, the methods of this class ensure the order of that array is preserved.

  See Also:
    `WeakReference`, `TypeDefinitionVariableArray`, `WeakReferenceTarget`, `WeakReferenceSet`, `TypeDefinitionWeakObjectReference`, `JPAGenerator.generateORM(java.util.Collection, String)`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `WeakReferenceVector()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `append(T item)`
    `void` | `append(WeakReference<T> reference)`
    `void` | `clear()`
    `boolean` | `contains(T item)`
    `int` | `count()`
    `static void` | `generateWeakReferenceORM(Node parent, String namespace, String prefix)`
    `T` | `getAt(int index)`
    `List<T>` | `getOptionalList()`
    `long` | `getPersistentID()`
    `List<T>` | `getRequiredList()`
    `void` | `insert(int index, T item)`
    `void` | `prepend(T item)`
    `boolean` | `remove(T essenceKind)`
    `void` | `removeAt(int index)`

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

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

- - ### Constructor Detail

    - #### WeakReferenceVector

          public WeakReferenceVector()

  - ### Method Detail

    - #### append

          public void append(T item)
                      throws NullPointerException

      Throws:
        `NullPointerException`

    - #### append

          public void append(WeakReference<T> reference)
                      throws NullPointerException

      Throws:
        `NullPointerException`

    - #### prepend

          public void prepend(T item)
                       throws NullPointerException

      Throws:
        `NullPointerException`

    - #### insert

          public void insert(int index,
                             T item)
                      throws NullPointerException,
                             IndexOutOfBoundsException

      Throws:
        `NullPointerException`
        `IndexOutOfBoundsException`

    - #### getRequiredList

          public List<T> getRequiredList()

    - #### getOptionalList

          public List<T> getOptionalList()
                                  throws PropertyNotPresentException

      Throws:
        `PropertyNotPresentException`

    - #### contains

          public boolean contains(T item)

    - #### getAt

          public T getAt(int index)
                  throws IndexOutOfBoundsException

      Throws:
        `IndexOutOfBoundsException`

    - #### removeAt

          public void removeAt(int index)

    - #### remove

          public boolean remove(T essenceKind)
                         throws NullPointerException

      Throws:
        `NullPointerException`

    - #### clear

          public void clear()

    - #### count

          public int count()

    - #### getPersistentID

          public long getPersistentID()

    - #### generateWeakReferenceORM

          public static final void generateWeakReferenceORM(Node parent,
                                                            String namespace,
                                                            String prefix)

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