T
- The type of object stored in this WrappedMapSetpublic class WrappedMapSet<T>
extends java.util.AbstractSet<T>
implements java.util.Set<T>
Constructor and Description |
---|
WrappedMapSet(java.lang.Class<C> cl)
Constructs a new WrappedMapSet with an instance of the given Class as the
underlying Map.
|
WrappedMapSet(java.lang.Class<C> cl,
java.util.Collection<? extends T> collection)
Constructs a new WrappedMapSet with an instance of the given Class as the
underlying Map.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(T item)
Adds the given Object to the WrappedMapSet.
|
void |
clear()
Removes all objects from the WrappedMapSet.
|
boolean |
contains(java.lang.Object item)
Returns true if the WrappedMapSet contains the given Object; false
otherwise.
|
boolean |
isEmpty()
Returns true if the WrappedMapSet is empty; false otherwise.
|
java.util.Iterator<T> |
iterator()
Iterates over the contents of the WrappedMapSet.
|
boolean |
remove(java.lang.Object item)
Removes the given Object from the WrappedMapSet.
|
int |
size()
Returns the number of objects contained within the WrappedMapSet.
|
addAll, containsAll, retainAll, toArray, toArray, toString
public WrappedMapSet(java.lang.Class<C> cl)
C
- Generic constraining construction of a WrappedMapSet to a
class that implements the Map interface.cl
- The Class (must implement the java.util.Map interface) used
for the Map underlying this WrappedMapSetjava.lang.IllegalArgumentException
- if the given Class is null or does not have a public, zero
argument constructor.public WrappedMapSet(java.lang.Class<C> cl, java.util.Collection<? extends T> collection)
C
- Generic constraining construction of a WrappedMapSet to a
class that implements the Map interface.cl
- The Class (must implement the java.util.Map interface) used
for the Map underlying this WrappedMapSetcollection
- A collection to be used to initialize the contents of the
WrappedMapSet.java.lang.IllegalArgumentException
- if the given Class is null or does not have a public, zero
argument constructor.java.lang.NullPointerException
- if the given Collection is nullpublic java.util.Iterator<T> iterator()
public int size()
public boolean isEmpty()
public boolean contains(java.lang.Object item)
public boolean add(T item)
public boolean remove(java.lang.Object item)