Package org.apache.empire.commons
Class ArraySet<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<E>
org.apache.empire.commons.ArraySet<E>
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<E>,Collection<E>,List<E>,RandomAccess,Set<E>
This class is a lightweight Set implementation using an ArrayList
- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanprotected voidprotected voidintprotected intindexOfArray(Object[] item) intlastIndexOf(Object item) booleantoString()Methods inherited from class java.util.ArrayList
addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, isEmpty, iterator, listIterator, listIterator, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeMethods inherited from class java.util.AbstractCollection
containsAllMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
containsAll
-
Constructor Details
-
ArraySet
public ArraySet()Default constructor -
ArraySet
public ArraySet(int initialCapacity) Constructor with initialCapacity- Parameters:
initialCapacity- the initial capacity
-
ArraySet
Constructor with initial list- Parameters:
items- the initial items
-
ArraySet
Copy constructor- Parameters:
other- the set from which to copy
-
-
Method Details
-
immutable
-
add
-
add
-
indexOf
-
lastIndexOf
- Specified by:
lastIndexOfin interfaceList<E>- Overrides:
lastIndexOfin classArrayList<E>
-
remove
-
toString
- Overrides:
toStringin classAbstractCollection<E>
-
fastAdd
-
fastAdd
-
indexOfArray
-