org.gcube.common.vremanagement.deployer.impl.state
Class CountableHashSet<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet<E>
java.util.HashSet<E>
org.gcube.common.vremanagement.deployer.impl.state.CountableHashSet<E>
- Type Parameters:
E - element type
- All Implemented Interfaces:
- Serializable, Cloneable, Iterable<E>, Collection<E>, Set<E>
public class CountableHashSet<E>
- extends HashSet<E>
- implements Serializable
An extension of the standard HashSet handling multiple instances of
the same element.
- Author:
- Manuele Simi (ISTI-CNR)
- See Also:
HashSet,
Set,
Serialized Form
CountableHashSet
public CountableHashSet()
-
CountableHashSet
public CountableHashSet(Collection<? extends E> c)
CountableHashSet
public CountableHashSet(int initialCapacity)
CountableHashSet
public CountableHashSet(int initialCapacity,
float loadFactor)
add
public boolean add(E o)
-
- Specified by:
add in interface Collection<E>- Specified by:
add in interface Set<E>- Overrides:
add in class HashSet<E>
remove
public boolean remove(Object o)
-
- Specified by:
remove in interface Collection<E>- Specified by:
remove in interface Set<E>- Overrides:
remove in class HashSet<E>
removeAll
public boolean removeAll(Collection<?> c)
-
- Specified by:
removeAll in interface Collection<E>- Specified by:
removeAll in interface Set<E>- Overrides:
removeAll in class AbstractSet<E>
addAll
public boolean addAll(Collection<? extends E> c)
-
- Specified by:
addAll in interface Collection<E>- Specified by:
addAll in interface Set<E>- Overrides:
addAll in class AbstractCollection<E>
clear
public void clear()
-
- Specified by:
clear in interface Collection<E>- Specified by:
clear in interface Set<E>- Overrides:
clear in class HashSet<E>
getCounter
public int getCounter(Object o)
- Gets the key counter of the given element
- Parameters:
o - the element to count
- Returns:
- the key counter
Copyright © 2013. All Rights Reserved.