18 #ifndef _DECAF_UTIL_ABSTRACTSET_H_ 19 #define _DECAF_UTIL_ABSTRACTSET_H_ 70 if (this->
size() <= collection.
size()) {
72 std::auto_ptr<Iterator<E> > iter(this->
iterator());
73 while (iter->hasNext()) {
74 if (collection.
contains(iter->next())) {
82 std::auto_ptr<Iterator<E> > iter(collection.
iterator());
83 while (iter->hasNext()) {
84 result = this->
remove(iter->next()) || result;
virtual ~AbstractSet()
Definition: AbstractSet.h:50
The root interface in the collection hierarchy.
Definition: Collection.h:68
This class provides a skeletal implementation of the Collection interface, to minimize the effort req...
Definition: AbstractCollection.h:58
A collection that contains no duplicate elements.
Definition: Set.h:45
virtual bool removeAll(const Collection< E > &collection)
Removes all this collection's elements that are also contained in the specified collection (optional ...
Definition: AbstractSet.h:67
virtual int size() const =0
Returns the number of elements in this collection.
virtual bool contains(const E &value) const =0
Returns true if this collection contains the specified element.
virtual decaf::util::Iterator< E > * iterator()=0
This class provides a skeletal implementation of the Set interface to minimize the effort required to...
Definition: AbstractSet.h:46
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements...
Definition: AprPool.h:25