Class MapBackedSet
java.lang.Object
org.apache.commons.collections.set.MapBackedSet
- All Implemented Interfaces:
Serializable,Iterable,Collection,Set
@Deprecated(since="2021-04-30")
public final class MapBackedSet
extends Object
implements Set, Serializable
Deprecated.
Apache Commons Collections version 3.x is being deprecated from AEMaaCS. The upgraded version 4.4 of Commons Collections is already included as replacement. Customers are advised to upgrade to this version of the library. Please note: the package name was changed to org.apache.commons.collections4. Further note that there are AEM APIs currently exposing the old collections classes; these will be updated in upcoming releases.
Decorates a
Map to obtain Set behaviour.
This class is used to create a Set with the same properties as
the key set of any map. Thus, a ReferenceSet can be created by wrapping a
ReferenceMap in an instance of this class.
Most map implementation can be used to create a set by passing in dummy values.
Exceptions include BidiMap implementations, as they require unique values.
- Since:
- Commons Collections 3.1
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanDeprecated.booleanaddAll(Collection coll) Deprecated.voidclear()Deprecated.booleanDeprecated.booleancontainsAll(Collection coll) Deprecated.static SetDeprecated.Factory method to create a set from a map.static SetDeprecated.Factory method to create a set from a map.booleanDeprecated.inthashCode()Deprecated.booleanisEmpty()Deprecated.iterator()Deprecated.booleanDeprecated.booleanremoveAll(Collection coll) Deprecated.booleanretainAll(Collection coll) Deprecated.intsize()Deprecated.Object[]toArray()Deprecated.Object[]Deprecated.Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.Set
spliterator
-
Method Details
-
decorate
Deprecated.Factory method to create a set from a map.- Parameters:
map- the map to decorate, must not be null- Throws:
IllegalArgumentException- if set is null
-
decorate
Deprecated.Factory method to create a set from a map.- Parameters:
map- the map to decorate, must not be nulldummyValue- the dummy value to use- Throws:
IllegalArgumentException- if map is null
-
size
public int size()Deprecated.- Specified by:
sizein interfaceCollection- Specified by:
sizein interfaceSet
-
isEmpty
public boolean isEmpty()Deprecated.- Specified by:
isEmptyin interfaceCollection- Specified by:
isEmptyin interfaceSet
-
iterator
Deprecated. -
contains
Deprecated.- Specified by:
containsin interfaceCollection- Specified by:
containsin interfaceSet
-
containsAll
Deprecated.- Specified by:
containsAllin interfaceCollection- Specified by:
containsAllin interfaceSet
-
add
Deprecated.- Specified by:
addin interfaceCollection- Specified by:
addin interfaceSet
-
addAll
Deprecated.- Specified by:
addAllin interfaceCollection- Specified by:
addAllin interfaceSet
-
remove
Deprecated.- Specified by:
removein interfaceCollection- Specified by:
removein interfaceSet
-
removeAll
Deprecated.- Specified by:
removeAllin interfaceCollection- Specified by:
removeAllin interfaceSet
-
retainAll
Deprecated.- Specified by:
retainAllin interfaceCollection- Specified by:
retainAllin interfaceSet
-
clear
public void clear()Deprecated.- Specified by:
clearin interfaceCollection- Specified by:
clearin interfaceSet
-
toArray
Deprecated.- Specified by:
toArrayin interfaceCollection- Specified by:
toArrayin interfaceSet
-
toArray
Deprecated.- Specified by:
toArrayin interfaceCollection- Specified by:
toArrayin interfaceSet
-
equals
Deprecated. -
hashCode
public int hashCode()Deprecated.
-