E - element typepublic class CountableHashSet<E> extends HashSet<E> implements Serializable
HashSet handling multiple instances of
the same element.HashSet,
Set,
Serialized Form| Constructor and Description |
|---|
CountableHashSet() |
CountableHashSet(Collection<? extends E> c) |
CountableHashSet(int initialCapacity) |
CountableHashSet(int initialCapacity,
float loadFactor) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E o) |
boolean |
addAll(Collection<? extends E> c) |
void |
clear() |
int |
getCounter(Object o)
Gets the key counter of the given element
|
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
equals, hashCodecontainsAll, retainAll, toArray, toArray, toStringpublic CountableHashSet()
public CountableHashSet(Collection<? extends E> c)
public CountableHashSet(int initialCapacity)
public CountableHashSet(int initialCapacity,
float loadFactor)
public boolean add(E o)
public boolean remove(Object o)
public boolean removeAll(Collection<?> c)
removeAll in interface Collection<E>removeAll in interface Set<E>removeAll in class AbstractSet<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()
public int getCounter(Object o)
o - the element to countCopyright © 2015. All Rights Reserved.