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, removeAll
containsAll, isEmpty, retainAll, toString
spliterator
containsAll, isEmpty, parallelStream, removeIf, retainAll, stream
public HashSet()
public HashSet(Collection<? extends E> c)
public boolean add(E e)
add
in interface Collection<E>
add
in class AbstractCollection<E>
public boolean addAll(Collection<? extends E> c)
addAll
in interface Collection<E>
addAll
in class AbstractCollection<E>
public void clear()
clear
in interface Collection<E>
clear
in class AbstractCollection<E>
public boolean contains(Object o)
contains
in interface Collection<E>
contains
in class AbstractCollection<E>
public boolean remove(Object o)
remove
in interface Collection<E>
remove
in class AbstractCollection<E>
public int size()
size
in interface Collection<E>
public Object[] toArray()
toArray
in interface Collection<E>
toArray
in class AbstractCollection<E>
public <T> T[] toArray(T[] a)
toArray
in interface Collection<E>
toArray
in class AbstractCollection<E>
protected void doReadObject(ObjectInputStream in) throws IOException, ClassNotFoundException
org.apache.commons.collections.map.AbstractHashedMap
.IOException
ClassNotFoundException
protected void doWriteObject(ObjectOutputStream out) throws IOException
org.apache.commons.collections.map.AbstractHashedMap
.IOException
protected boolean itemEquals(Object a, Object b)
protected int itemHashCode(Object o)
Copyright © 2018. All rights reserved.