Class MapBackedSet<E,V>
java.lang.Object
org.apache.openjpa.lib.util.collections.MapBackedSet<E,V>
- All Implemented Interfaces:
Serializable,Iterable<E>,Collection<E>,Set<E>
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends E> coll) voidclear()booleanbooleancontainsAll(Collection<?> coll) booleaninthashCode()booleanisEmpty()iterator()static <E,V> MapBackedSet<E, V> mapBackedSet(Map<E, ? super V> map) Factory method to create a set from a map.static <E,V> MapBackedSet<E, V> mapBackedSet(Map<E, ? super V> map, V dummyValue) Factory method to create a set from a map.booleanbooleanremoveAll(Collection<?> coll) booleanbooleanretainAll(Collection<?> coll) intsize()Object[]toArray()<T> T[]toArray(T[] array) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, stream, toArrayMethods inherited from interface java.util.Set
spliterator
-
Method Details
-
mapBackedSet
Factory method to create a set from a map.- Type Parameters:
E- the element typeV- the dummy value type in the map- Parameters:
map- the map to decorate, must not be null- Returns:
- a new map backed set
- Throws:
NullPointerException- if map is null- Since:
- 4.0
-
mapBackedSet
Factory method to create a set from a map.- Type Parameters:
E- the element typeV- the dummy value type in the map- Parameters:
map- the map to decorate, must not be nulldummyValue- the dummy value to use- Returns:
- a new map backed set
- Throws:
NullPointerException- if map is null- Since:
- 4.0
-
size
public int size() -
isEmpty
public boolean isEmpty() -
iterator
-
contains
-
containsAll
- Specified by:
containsAllin interfaceCollection<E>- Specified by:
containsAllin interfaceSet<E>
-
add
-
addAll
-
remove
-
removeIf
- Specified by:
removeIfin interfaceCollection<E>- Since:
- 4.4
-
removeAll
-
retainAll
-
clear
public void clear() -
toArray
-
toArray
public <T> T[] toArray(T[] array) -
equals
-
hashCode
public int hashCode()
-