Package com.storedobject.common
Class ArrayListSet<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<E>
com.storedobject.common.ArrayList<E>
com.storedobject.common.ArrayListSet<E>
- Type Parameters:
E- Value type.
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<E>,Collection<E>,List<E>,RandomAccess,SequencedCollection<E>
An ArrayList that has the properties of a Set (Only one instance will appear even if duplicate elements are added).
- Author:
- Syam
- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
ConstructorsConstructorDescriptionCreate an ArrayList that has the properties of a SetArrayListSet(int initialCapacity) Create an ArrayList that has the properties of a Set for a specified initial capacityArrayListSet(Iterable<? extends E> elements) Create an ArrayList that has the properties of a Set for specified iterable elementsArrayListSet(Collection<? extends E> c) Create an ArrayList that has the properties of a Set for specified elements of a collection -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleanadd elements to a listbooleanaddAll(int index, Collection<? extends E> c) booleanadd elements to a listbooleanaddAll(Collection<? extends E> c) Methods inherited from class com.storedobject.common.ArrayList
firstElement, lastElementMethods inherited from class java.util.ArrayList
addFirst, addLast, clear, clone, contains, ensureCapacity, equals, forEach, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeIf, removeLast, removeRange, replaceAll, retainAll, size, sort, spliterator, subList, toArray, toArray, trimToSizeMethods inherited from class java.util.AbstractCollection
containsAll, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, stream, toArrayMethods inherited from interface java.util.List
containsAll, reversed
-
Constructor Details
-
ArrayListSet
public ArrayListSet()Create an ArrayList that has the properties of a Set -
ArrayListSet
public ArrayListSet(int initialCapacity) Create an ArrayList that has the properties of a Set for a specified initial capacity- Parameters:
initialCapacity- Initial capacity specified while creating the list
-
ArrayListSet
Create an ArrayList that has the properties of a Set for specified elements of a collection- Parameters:
c- Collection
-
ArrayListSet
-
-
Method Details
-
add
-
set
-
add
-
addAll
-
addAll
-
addAll
-
addAll
-