java.util
public
abstract
class
java.util.AbstractSet<E>
AbstractSet is an abstract implementation of the Set interface. This
Implementation does not support adding. A subclass must implement the
abstract methods iterator() and size().
Known Direct Subclasses
Known Indirect Subclasses
Summary
Protected Constructors
Public Methods
add,
addAll,
clear,
contains,
containsAll,
isEmpty,
iterator,
remove,
removeAll,
retainAll,
size,
toArray,
toArray,
toString
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
add,
addAll,
clear,
contains,
containsAll,
equals,
hashCode,
isEmpty,
iterator,
remove,
removeAll,
retainAll,
size,
toArray,
toArray
Methods inherited
from interface
java.util.Set
add,
addAll,
clear,
contains,
containsAll,
equals,
hashCode,
isEmpty,
iterator,
remove,
removeAll,
retainAll,
size,
toArray,
toArray
Details
Protected Constructors
protected
AbstractSet()
Constructs a new instance of this AbstractSet.
Public Methods
public
boolean
equals(Object object)
Compares the specified object to this Set and answer if they are equal.
The object must be an instance of Set and contain the same objects.
Parameters
object
| the object to compare with this object |
Returns
- true if the specified object is equal to this Set, false
otherwise
public
int
hashCode()
Returns an integer hash code for the receiver. Objects which are equal
answer the same value for this method.
public
boolean
removeAll(Collection<?> collection)
Removes all occurrences in this Collection of each object in the
specified Collection.
Parameters
collection
| the Collection of objects to remove |
Returns
- true if this Collection is modified, false otherwise