E
- the element typepublic class HashSet<E> extends java.util.AbstractSet<E> implements java.io.Serializable
Constructor and Description |
---|
HashSet() |
HashSet(java.util.Collection<? extends E> c) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(E e) |
boolean |
addAll(java.util.Collection<? extends E> c) |
void |
clear() |
boolean |
contains(java.lang.Object o) |
protected void |
doReadObject(java.io.ObjectInputStream in)
Adapted from org.apache.commons.collections.map.AbstractHashedMap.
|
protected void |
doWriteObject(java.io.ObjectOutputStream out)
Adapted from org.apache.commons.collections.map.AbstractHashedMap.
|
protected boolean |
itemEquals(java.lang.Object a,
java.lang.Object b)
Returns whether two items are equal for the purposes of this set.
|
protected int |
itemHashCode(java.lang.Object o)
Return the hashCode for an item.
|
java.util.Iterator<E> |
iterator() |
boolean |
remove(java.lang.Object o) |
int |
size() |
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
public HashSet()
public void clear()
public boolean contains(java.lang.Object o)
public boolean remove(java.lang.Object o)
public int size()
public java.lang.Object[] toArray()
public <T> T[] toArray(T[] a)
protected void doReadObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
protected void doWriteObject(java.io.ObjectOutputStream out) throws java.io.IOException
java.io.IOException
protected boolean itemEquals(java.lang.Object a, java.lang.Object b)
protected int itemHashCode(java.lang.Object o)
Copyright 2007-2017 Johan Hall, Jens Nilsson and Joakim Nivre.