activemq-cpp-3.6.0
|
A collection that contains no duplicate elements. More...
#include <src/main/decaf/util/Set.h>
Public Member Functions | |
virtual | ~Set () |
![]() | |
virtual | ~Collection () |
virtual void | copy (const Collection< E > &collection)=0 |
Renders this Collection as a Copy of the given Collection. | |
virtual bool | add (const E &value)=0 |
Returns true if this collection changed as a result of the call. | |
virtual bool | addAll (const Collection< E > &collection)=0 |
Adds all of the elements in the specified collection to this collection. | |
virtual void | clear ()=0 |
Removes all of the elements from this collection (optional operation). | |
virtual bool | contains (const E &value) const =0 |
Returns true if this collection contains the specified element. | |
virtual bool | containsAll (const Collection< E > &collection) const =0 |
Returns true if this collection contains all of the elements in the specified collection. | |
virtual bool | equals (const Collection< E > &value) const =0 |
Compares the passed collection to this one, if they contain the same elements, i.e. | |
virtual bool | isEmpty () const =0 |
virtual bool | remove (const E &value)=0 |
Removes a single instance of the specified element from the collection. | |
virtual bool | removeAll (const Collection< E > &collection)=0 |
Removes all this collection's elements that are also contained in the specified collection (optional operation). | |
virtual bool | retainAll (const Collection< E > &collection)=0 |
Retains only the elements in this collection that are contained in the specified collection (optional operation). | |
virtual int | size () const =0 |
Returns the number of elements in this collection. | |
virtual std::vector< E > | toArray () const =0 |
Returns an array containing all of the elements in this collection. | |
![]() | |
virtual | ~Iterable () |
virtual decaf::util::Iterator < E > * | iterator ()=0 |
virtual decaf::util::Iterator < E > * | iterator () const =0 |
![]() | |
virtual | ~Synchronizable () |
virtual void | lock ()=0 |
Locks the object. | |
virtual bool | tryLock ()=0 |
Attempts to Lock the object, if the lock is already held by another thread than this method returns false. | |
virtual void | unlock ()=0 |
Unlocks the object. | |
virtual void | wait ()=0 |
Waits on a signal from this object, which is generated by a call to Notify. | |
virtual void | wait (long long millisecs)=0 |
Waits on a signal from this object, which is generated by a call to Notify. | |
virtual void | wait (long long millisecs, int nanos)=0 |
Waits on a signal from this object, which is generated by a call to Notify. | |
virtual void | notify ()=0 |
Signals a waiter on this object that it can now wake up and continue. | |
virtual void | notifyAll ()=0 |
Signals the waiters on this object that it can now wake up and continue. |
A collection that contains no duplicate elements.
More formally, sets contain no pair of elements e1 and e2 such that e1 == e2, and at most one null element. As implied by its name, this interface models the mathematical set abstraction.
The additional stipulation on constructors is, not surprisingly, that all constructors must create a set that contains no duplicate elements (as defined above).
Note: Great care must be exercised if mutable objects are used as set elements. The behavior of a set is not specified if the value of an object is changed in a manner that affects equals comparisons while the object is an element in the set.
|
inlinevirtual |