org.apache.torque.util
Class UniqueList
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList
org.apache.torque.util.UniqueList
- All Implemented Interfaces:
- Serializable, Cloneable, Iterable, Collection, List, RandomAccess
public class UniqueList
- extends ArrayList
List with unique entries. UniqueList does not allow null nor duplicates.
- Version:
- $Id: UniqueList.java 473821 2006-11-11 22:37:25Z tv $
- Author:
- Martin Poeschl
- See Also:
- Serialized Form
Method Summary |
boolean |
add(Object o)
Adds an Object to the list. |
Methods inherited from class java.util.ArrayList |
add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeRange, retainAll, set, size, subList, toArray, toArray, trimToSize |
UniqueList
public UniqueList()
- Constructs an empty UniqueList.
UniqueList
public UniqueList(UniqueList list)
- Copy-constructor. Creates a shallow copy of an UniqueList.
- Parameters:
list
- the uniqueList to copy
add
public boolean add(Object o)
- Adds an Object to the list.
- Specified by:
add
in interface Collection
- Specified by:
add
in interface List
- Overrides:
add
in class ArrayList
- Parameters:
o
- the Object to add
- Returns:
- true if the Object is added
Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.