public class ArraySet<E> extends AbstractSet<E> implements Set<E>
Set
interface.
Note that this implementation is not synchronized.
Modifier and Type | Method and Description |
---|---|
boolean |
add(E element) |
boolean |
addAll(Collection<? extends E> elements) |
Iterator<E> |
iterator() |
boolean |
remove(Object element) |
boolean |
removeAll(Collection<?> elements) |
int |
size() |
equals, hashCode
clear, contains, containsAll, isEmpty, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
clear, contains, containsAll, equals, hashCode, isEmpty, retainAll, spliterator, toArray, toArray
parallelStream, removeIf, stream
protected Object[] array
public ArraySet()
ArraySet
.public boolean add(@Nullable E element)
add
in interface Collection<E>
add
in interface Set<E>
add
in class AbstractCollection<E>
public boolean addAll(Collection<? extends E> elements)
addAll
in interface Collection<E>
addAll
in interface Set<E>
addAll
in class AbstractCollection<E>
public boolean remove(@Nullable Object element)
remove
in interface Collection<E>
remove
in interface Set<E>
remove
in class AbstractCollection<E>
public boolean removeAll(Collection<?> elements)
removeAll
in interface Collection<E>
removeAll
in interface Set<E>
removeAll
in class AbstractSet<E>
public int size()
size
in interface Collection<E>
size
in interface Set<E>
size
in class AbstractCollection<E>
Copyright © 2017. All rights reserved.