Package com.sun.enterprise.deployment
Class OrderedSet<T>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.Vector<T>
-
- com.sun.enterprise.deployment.OrderedSet<T>
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<T>
,Collection<T>
,List<T>
,RandomAccess
,Set<T>
public class OrderedSet<T> extends Vector<T> implements Set<T>
I am an ordered collection that does not allow duplicates.- Author:
- Danny Coward
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Constructor Summary
Constructors Constructor Description OrderedSet()
Construct an empty collection.OrderedSet(Collection<T> c)
Construct an ordered set from the given collection.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(T o)
Add the given object to the Set if it is not equal (equals()) to an element already in the set.boolean
addAll(Collection<? extends T> c)
Add all the elements in the given set that are not already in this ordered set.-
Methods inherited from class java.util.Vector
add, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, forEach, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeIf, removeRange, replaceAll, retainAll, set, setElementAt, setSize, size, sort, spliterator, subList, toArray, toArray, toString, trimToSize
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
-
-
-
Constructor Detail
-
OrderedSet
public OrderedSet()
Construct an empty collection.
-
OrderedSet
public OrderedSet(Collection<T> c)
Construct an ordered set from the given collection.
-
-
Method Detail
-
add
public boolean add(T o)
Add the given object to the Set if it is not equal (equals()) to an element already in the set.
-
addAll
public boolean addAll(Collection<? extends T> c)
Add all the elements in the given set that are not already in this ordered set.
-
-