E - the element typepublic class HashSet<E> extends AbstractSet<E> implements Serializable
| Constructor and Description |
|---|
HashSet() |
HashSet(Collection<? extends E> c) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E e) |
boolean |
addAll(Collection<? extends E> c) |
void |
clear() |
boolean |
contains(Object o) |
protected void |
doReadObject(ObjectInputStream in)
Adapted from
org.apache.commons.collections.map.AbstractHashedMap. |
protected void |
doWriteObject(ObjectOutputStream out)
Adapted from
org.apache.commons.collections.map.AbstractHashedMap. |
protected boolean |
itemEquals(Object a,
Object b)
Returns whether two items are equal for the purposes of this set.
|
protected int |
itemHashCode(Object o)
Return the hashCode for an item.
|
Iterator<E> |
iterator() |
boolean |
remove(Object o) |
int |
size() |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
equals, hashCode, removeAllcontainsAll, isEmpty, retainAll, toStringcontainsAll, isEmpty, retainAllpublic HashSet()
public HashSet(Collection<? extends E> c)
public boolean add(E e)
add in interface Collection<E>add in interface Set<E>add in class AbstractCollection<E>public boolean addAll(Collection<? extends E> c)
addAll in interface Collection<E>addAll in interface Set<E>addAll in class AbstractCollection<E>public void clear()
clear in interface Collection<E>clear in interface Set<E>clear in class AbstractCollection<E>public boolean contains(Object o)
contains in interface Collection<E>contains in interface Set<E>contains in class AbstractCollection<E>public boolean remove(Object o)
remove in interface Collection<E>remove in interface Set<E>remove in class AbstractCollection<E>public int size()
size in interface Collection<E>size in interface Set<E>size in class AbstractCollection<E>public Object[] toArray()
toArray in interface Collection<E>toArray in interface Set<E>toArray in class AbstractCollection<E>public <T> T[] toArray(T[] a)
toArray in interface Collection<E>toArray in interface Set<E>toArray in class AbstractCollection<E>protected void doReadObject(ObjectInputStream in) throws IOException, ClassNotFoundException
org.apache.commons.collections.map.AbstractHashedMap.IOExceptionClassNotFoundExceptionprotected void doWriteObject(ObjectOutputStream out) throws IOException
org.apache.commons.collections.map.AbstractHashedMap.IOExceptionprotected boolean itemEquals(Object a, Object b)
protected int itemHashCode(Object o)
Copyright © 2018. All rights reserved.