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 TypeMethodDescriptionvoid
boolean
boolean
add elements to a listboolean
addAll
(int index, Collection<? extends E> c) boolean
add elements to a listboolean
addAll
(Collection<? extends E> c) Methods inherited from class com.storedobject.common.ArrayList
firstElement, lastElement
Methods 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, 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, 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
-