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

tv.amwa.maj.industry

## Class WeakReferenceSet<T extends WeakReferenceTarget>

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

- Type Parameters:
    `T` - Type of the target of all the references in the set.

      public class WeakReferenceSet<T extends WeakReferenceTarget>
      extends Object

  Represents a set of weak references and provides a means to resolve them at runtime. The class provides a consistent set of delegate add, contains and remove methods for weak reference set type properties.

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

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `WeakReferenceSet()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(T item)`
    `void` | `add(WeakReference<T> reference)`
    `void` | `clear()`
    `boolean` | `contains(T item)`
    `int` | `count()`
    `Set<T>` | `getOptionalSet()`
    `Set<T>` | `getRequiredSet()`
    `boolean` | `remove(T item)`

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

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

- - ### Constructor Detail

    - #### WeakReferenceSet

          public WeakReferenceSet()

  - ### Method Detail

    - #### add

          public void add(T item)
                   throws NullPointerException

      Throws:
        `NullPointerException`

    - #### add

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

      Throws:
        `NullPointerException`

    - #### contains

          public boolean contains(T item)
                           throws NullPointerException

      Throws:
        `NullPointerException`

    - #### remove

          public boolean remove(T item)
                         throws NullPointerException

      Throws:
        `NullPointerException`

    - #### clear

          public void clear()

    - #### count

          public int count()

    - #### getOptionalSet

          public Set<T> getOptionalSet()
                                throws PropertyNotPresentException

      Throws:
        `PropertyNotPresentException`

    - #### getRequiredSet

          public Set<T> getRequiredSet()

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