Package org.apache.torque.util

## Class UniqueList<T>

- java.lang.Object
- - java.util.AbstractCollection<E>
  - - java.util.AbstractList<E>
    - - java.util.ArrayList<T>
      - - org.apache.torque.util.UniqueList<T>

- Type Parameters:
    `T` - the type of objects contained in the List.
  All Implemented Interfaces:
    `Serializable`, `Cloneable`, `Iterable<T>`, `Collection<T>`, `List<T>`, `RandomAccess`

      public class UniqueList<T>
      extends ArrayList<T>

  List with unique entries. UniqueList does not allow null nor duplicates.
  Version:
    $Id: UniqueList.java 1839288 2018-08-27 09:48:33Z tv $
  Author:
    Martin Poeschl
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class java.util.AbstractList

      `modCount`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `UniqueList()` | Constructs an empty UniqueList.
    `UniqueList​(UniqueList<T> list)` | Copy-constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `add​(T o)` | Adds an Object to the list.

    - ### Methods inherited from class java.util.ArrayList

      `add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize`

    - ### Methods inherited from class java.util.AbstractCollection

      `containsAll, toString`

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

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

    - ### Methods inherited from interface java.util.Collection

      `parallelStream, stream, toArray`

    - ### Methods inherited from interface java.util.List

      `containsAll`

- - ### Constructor Detail

    - #### UniqueList

          public UniqueList()

      Constructs an empty UniqueList.

    - #### UniqueList

          public UniqueList​(UniqueList<T> list)

      Copy-constructor. Creates a shallow copy of an UniqueList.
      Parameters:
        `list` - the uniqueList to copy

  - ### Method Detail

    - #### add

          public boolean add​(T o)

      Adds an Object to the list.
      Specified by:
        `add` in interface `Collection<T>`
      Specified by:
        `add` in interface `List<T>`
      Overrides:
        `add` in class `ArrayList<T>`
      Parameters:
        `o` - the Object to add
      Returns:
        true if the Object is added