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 TypeMethodDescriptionboolean
boolean
addAll
(Collection<? extends E> coll) void
clear()
boolean
boolean
containsAll
(Collection<?> coll) boolean
int
hashCode()
boolean
isEmpty()
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.boolean
boolean
removeAll
(Collection<?> coll) boolean
boolean
retainAll
(Collection<?> coll) int
size()
Object[]
toArray()
<T> T[]
toArray
(T[] array) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
Methods 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:
containsAll
in interfaceCollection<E>
- Specified by:
containsAll
in interfaceSet<E>
-
add
-
addAll
-
remove
-
removeIf
- Specified by:
removeIf
in interfaceCollection<E>
- Since:
- 4.4
-
removeAll
-
retainAll
-
clear
public void clear() -
toArray
-
toArray
public <T> T[] toArray(T[] array) -
equals
-
hashCode
public int hashCode()
-