public class ArraySet<E> extends ArrayList<E> implements Set<E>
modCount| Constructor and Description |
|---|
ArraySet()
Default constructor
|
ArraySet(ArraySet<E> other)
Copy constructor
|
ArraySet(E... items)
Constructor with initial list
|
ArraySet(int initialCapacity)
Constructor with initialCapacity
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E e) |
void |
add(int index,
E element) |
protected void |
fastAdd(E element) |
protected void |
fastAdd(int index,
E element) |
Set<E> |
immutable() |
int |
indexOf(Object item) |
protected int |
indexOfArray(Object[] item) |
int |
lastIndexOf(Object item) |
boolean |
remove(Object item) |
String |
toString() |
addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, isEmpty, iterator, listIterator, listIterator, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeequals, hashCodecontainsAllfinalize, getClass, notify, notifyAll, wait, wait, waitaddAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, removeAll, retainAll, size, spliterator, toArray, toArrayparallelStream, removeIf, streamcontainsAll, equals, hashCodepublic ArraySet()
public ArraySet(int initialCapacity)
initialCapacity - the initial capacity@SafeVarargs public ArraySet(E... items)
items - the initial itemspublic boolean add(E e)
public void add(int index,
E element)
public int indexOf(Object item)
public int lastIndexOf(Object item)
lastIndexOf in interface List<E>lastIndexOf in class ArrayList<E>public boolean remove(Object item)
public String toString()
toString in class AbstractCollection<E>protected void fastAdd(E element)
protected void fastAdd(int index,
E element)
protected int indexOfArray(Object[] item)
Copyright © 2008–2023 Apache Software Foundation. All rights reserved.