activemq-cpp-3.4.0
|
The root interface in the collection hierarchy. More...
#include <src/main/decaf/util/Collection.h>
Public Member Functions | |
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. |
The root interface in the collection hierarchy.
A collection represents a group of objects, known as its elements. Some collections allow duplicate elements and others do not. Some are ordered and others unordered. This interface is typically used to pass collections around and manipulate them where maximum generality is desired.
All general-purpose Collection implementation classes (which typically implement Collection indirectly through one of its subinterfaces) should provide two "standard" constructors: a void (no arguments) constructor, which creates an empty collection, and a constructor with a single argument of type Collection, which creates a new collection with the same elements as its argument. In effect, the latter constructor allows the user to copy any collection, producing an equivalent collection of the desired implementation type. There is no way to enforce this convention (as interfaces cannot contain constructors) but all of the general-purpose Collection implementations in the Decaf platform libraries comply.
The "destructive" methods contained in this interface, that is, the methods that modify the collection on which they operate, are specified to throw UnsupportedOperationException if this collection does not support the operation. If this is the case, these methods may, but are not required to, throw an UnsupportedOperationException if the invocation would have no effect on the collection. For example, invoking the addAll(Collection) method on an unmodifiable collection may, but is not required to, throw the exception if the collection to be added is empty.
Many methods in Collections Framework interfaces are defined in terms of the equals method. For example, the specification for the contains(Object o) method says: "returns true if and only if this collection contains at least one element e such that (o==null ? e==null : o.equals(e))."
virtual decaf::util::Collection< E >::~Collection | ( | ) | [inline, virtual] |
virtual bool decaf::util::Collection< E >::add | ( | const E & | value | ) | [pure virtual] |
Returns true if this collection changed as a result of the call.
(Returns false if this collection does not permit duplicates and already contains the specified element.)
Collections that support this operation may place limitations on what elements may be added to this collection. In particular, some collections will refuse to add null elements, and others will impose restrictions on the type of elements that may be added. Collection classes should clearly specify in their documentation any restrictions on what elements may be added.
If a collection refuses to add a particular element for any reason other than that it already contains the element, it must throw an exception (rather than returning false). This preserves the invariant that a collection always contains the specified element after this call returns.
For non-pointer values, i.e. class instances or string's the object will be copied into the collection, thus the object must support being copied, must not hide the copy constructor and assignment operator.
value | The reference to the element to add to this Collection. |
UnsupportedOperationExceptio | if this is an unmodifiable collection. |
NullPointerException | if the Collection is a container of pointers and does not allow NULL values. |
IllegalArgumentException | if some property of the element prevents it from being added to this collection |
IllegalStateException | if the element cannot be added at this time due to insertion restrictions. |
Implemented in decaf::util::AbstractList< E >, decaf::util::AbstractQueue< E >, decaf::util::ArrayList< E >, decaf::util::concurrent::CopyOnWriteArrayList< E >, decaf::util::concurrent::CopyOnWriteArraySet< E >, decaf::util::LinkedList< E >, decaf::util::PriorityQueue< E >, decaf::util::StlList< E >, decaf::util::StlSet< E >, decaf::util::AbstractList< Pointer< Transport > >, decaf::util::AbstractList< cms::MessageConsumer * >, decaf::util::AbstractList< CompositeTask * >, decaf::util::AbstractList< URI >, decaf::util::AbstractList< Pointer< MessageDispatch > >, decaf::util::AbstractList< Pointer< DestinationInfo > >, decaf::util::AbstractList< PrimitiveValueNode >, decaf::util::AbstractList< Pointer< Command > >, decaf::util::AbstractList< Pointer< BackupTransport > >, decaf::util::AbstractList< cms::MessageProducer * >, decaf::util::AbstractList< cms::Destination * >, decaf::util::AbstractList< cms::Session * >, decaf::util::AbstractList< cms::Connection * >, decaf::util::concurrent::CopyOnWriteArrayList< ServiceListener * >, decaf::util::LinkedList< Pointer< Transport > >, decaf::util::LinkedList< cms::MessageConsumer * >, decaf::util::LinkedList< CompositeTask * >, decaf::util::LinkedList< URI >, decaf::util::LinkedList< Pointer< MessageDispatch > >, decaf::util::LinkedList< Pointer< DestinationInfo > >, decaf::util::LinkedList< PrimitiveValueNode >, decaf::util::LinkedList< Pointer< Command > >, decaf::util::LinkedList< Pointer< BackupTransport > >, decaf::util::LinkedList< cms::MessageProducer * >, decaf::util::LinkedList< cms::Destination * >, decaf::util::LinkedList< cms::Session * >, decaf::util::LinkedList< cms::Connection * >, decaf::util::StlSet< Pointer< Synchronization > >, and decaf::util::StlSet< Resource * >.
Referenced by decaf::util::concurrent::SynchronousQueue< E >::drainTo(), and decaf::util::concurrent::LinkedBlockingQueue< E >::drainTo().
virtual bool decaf::util::Collection< E >::addAll | ( | const Collection< E > & | collection | ) | [pure virtual] |
Adds all of the elements in the specified collection to this collection.
The behavior of this operation is undefined if the specified collection is modified while the operation is in progress. (This implies that the behavior of this call is undefined if the specified collection is this collection, and this collection is nonempty.)
collection | The Collection whose elements are added to this one. |
UnsupportedOperationExceptio | if this is an unmodifiable collection. |
NullPointerException | if the Collection is a container of pointers and does not allow NULL values. |
IllegalArgumentException | if some property of an element prevents it from being added to this collection |
IllegalStateException | if an element cannot be added at this time due to insertion restrictions. |
Implemented in decaf::util::AbstractCollection< E >, decaf::util::AbstractQueue< E >, decaf::util::ArrayList< E >, decaf::util::concurrent::CopyOnWriteArrayList< E >, decaf::util::concurrent::CopyOnWriteArraySet< E >, decaf::util::LinkedList< E >, decaf::util::StlList< E >, decaf::util::AbstractCollection< Pointer< Transport > >, decaf::util::AbstractCollection< Pointer< Synchronization > >, decaf::util::AbstractCollection< Resource * >, decaf::util::AbstractCollection< cms::MessageConsumer * >, decaf::util::AbstractCollection< CompositeTask * >, decaf::util::AbstractCollection< URI >, decaf::util::AbstractCollection< Pointer< MessageDispatch > >, decaf::util::AbstractCollection< Pointer< DestinationInfo > >, decaf::util::AbstractCollection< PrimitiveValueNode >, decaf::util::AbstractCollection< Pointer< Command > >, decaf::util::AbstractCollection< Pointer< BackupTransport > >, decaf::util::AbstractCollection< cms::MessageProducer * >, decaf::util::AbstractCollection< cms::Destination * >, decaf::util::AbstractCollection< cms::Session * >, decaf::util::AbstractCollection< cms::Connection * >, decaf::util::concurrent::CopyOnWriteArrayList< ServiceListener * >, decaf::util::LinkedList< Pointer< Transport > >, decaf::util::LinkedList< cms::MessageConsumer * >, decaf::util::LinkedList< CompositeTask * >, decaf::util::LinkedList< URI >, decaf::util::LinkedList< Pointer< MessageDispatch > >, decaf::util::LinkedList< Pointer< DestinationInfo > >, decaf::util::LinkedList< PrimitiveValueNode >, decaf::util::LinkedList< Pointer< Command > >, decaf::util::LinkedList< Pointer< BackupTransport > >, decaf::util::LinkedList< cms::MessageProducer * >, decaf::util::LinkedList< cms::Destination * >, decaf::util::LinkedList< cms::Session * >, and decaf::util::LinkedList< cms::Connection * >.
virtual void decaf::util::Collection< E >::clear | ( | ) | [pure virtual] |
Removes all of the elements from this collection (optional operation).
This collection will be empty after this method returns unless it throws an exception.
UnsupportedOperationExceptio | if this is an unmodifiable collection. |
Implemented in decaf::util::AbstractCollection< E >, decaf::util::AbstractList< E >, decaf::util::AbstractQueue< E >, decaf::util::ArrayList< E >, decaf::util::concurrent::CopyOnWriteArrayList< E >, decaf::util::concurrent::CopyOnWriteArraySet< E >, decaf::util::concurrent::LinkedBlockingQueue< E >, decaf::util::concurrent::SynchronousQueue< E >, decaf::util::LinkedList< E >, decaf::util::PriorityQueue< E >, decaf::util::StlList< E >, decaf::util::StlSet< E >, decaf::util::AbstractCollection< Pointer< Transport > >, decaf::util::AbstractCollection< Pointer< Synchronization > >, decaf::util::AbstractCollection< Resource * >, decaf::util::AbstractCollection< cms::MessageConsumer * >, decaf::util::AbstractCollection< CompositeTask * >, decaf::util::AbstractCollection< URI >, decaf::util::AbstractCollection< Pointer< MessageDispatch > >, decaf::util::AbstractCollection< Pointer< DestinationInfo > >, decaf::util::AbstractCollection< PrimitiveValueNode >, decaf::util::AbstractCollection< Pointer< Command > >, decaf::util::AbstractCollection< Pointer< BackupTransport > >, decaf::util::AbstractCollection< cms::MessageProducer * >, decaf::util::AbstractCollection< cms::Destination * >, decaf::util::AbstractCollection< cms::Session * >, decaf::util::AbstractCollection< cms::Connection * >, decaf::util::AbstractList< Pointer< Transport > >, decaf::util::AbstractList< cms::MessageConsumer * >, decaf::util::AbstractList< CompositeTask * >, decaf::util::AbstractList< URI >, decaf::util::AbstractList< Pointer< MessageDispatch > >, decaf::util::AbstractList< Pointer< DestinationInfo > >, decaf::util::AbstractList< PrimitiveValueNode >, decaf::util::AbstractList< Pointer< Command > >, decaf::util::AbstractList< Pointer< BackupTransport > >, decaf::util::AbstractList< cms::MessageProducer * >, decaf::util::AbstractList< cms::Destination * >, decaf::util::AbstractList< cms::Session * >, decaf::util::AbstractList< cms::Connection * >, decaf::util::concurrent::CopyOnWriteArrayList< ServiceListener * >, decaf::util::LinkedList< Pointer< Transport > >, decaf::util::LinkedList< cms::MessageConsumer * >, decaf::util::LinkedList< CompositeTask * >, decaf::util::LinkedList< URI >, decaf::util::LinkedList< Pointer< MessageDispatch > >, decaf::util::LinkedList< Pointer< DestinationInfo > >, decaf::util::LinkedList< PrimitiveValueNode >, decaf::util::LinkedList< Pointer< Command > >, decaf::util::LinkedList< Pointer< BackupTransport > >, decaf::util::LinkedList< cms::MessageProducer * >, decaf::util::LinkedList< cms::Destination * >, decaf::util::LinkedList< cms::Session * >, decaf::util::LinkedList< cms::Connection * >, decaf::util::StlSet< Pointer< Synchronization > >, and decaf::util::StlSet< Resource * >.
virtual bool decaf::util::Collection< E >::contains | ( | const E & | value | ) | const [pure virtual] |
Returns true if this collection contains the specified element.
More formally, returns true if and only if this collection contains at least one element e such that (value == NULL ? e == NULL : value == e ).
value | The value to check for presence in the collection. |
NullPointerException | if the Collection contains pointers and the Collection does not allow for NULL elements (optional check). |
Implemented in decaf::util::AbstractCollection< E >, decaf::util::ArrayList< E >, decaf::util::concurrent::CopyOnWriteArrayList< E >, decaf::util::concurrent::CopyOnWriteArraySet< E >, decaf::util::LinkedList< E >, decaf::util::StlList< E >, decaf::util::StlSet< E >, decaf::util::AbstractCollection< Pointer< Transport > >, decaf::util::AbstractCollection< Pointer< Synchronization > >, decaf::util::AbstractCollection< Resource * >, decaf::util::AbstractCollection< cms::MessageConsumer * >, decaf::util::AbstractCollection< CompositeTask * >, decaf::util::AbstractCollection< URI >, decaf::util::AbstractCollection< Pointer< MessageDispatch > >, decaf::util::AbstractCollection< Pointer< DestinationInfo > >, decaf::util::AbstractCollection< PrimitiveValueNode >, decaf::util::AbstractCollection< Pointer< Command > >, decaf::util::AbstractCollection< Pointer< BackupTransport > >, decaf::util::AbstractCollection< cms::MessageProducer * >, decaf::util::AbstractCollection< cms::Destination * >, decaf::util::AbstractCollection< cms::Session * >, decaf::util::AbstractCollection< cms::Connection * >, decaf::util::concurrent::CopyOnWriteArrayList< ServiceListener * >, decaf::util::LinkedList< Pointer< Transport > >, decaf::util::LinkedList< cms::MessageConsumer * >, decaf::util::LinkedList< CompositeTask * >, decaf::util::LinkedList< URI >, decaf::util::LinkedList< Pointer< MessageDispatch > >, decaf::util::LinkedList< Pointer< DestinationInfo > >, decaf::util::LinkedList< PrimitiveValueNode >, decaf::util::LinkedList< Pointer< Command > >, decaf::util::LinkedList< Pointer< BackupTransport > >, decaf::util::LinkedList< cms::MessageProducer * >, decaf::util::LinkedList< cms::Destination * >, decaf::util::LinkedList< cms::Session * >, decaf::util::LinkedList< cms::Connection * >, decaf::util::StlSet< Pointer< Synchronization > >, and decaf::util::StlSet< Resource * >.
Referenced by decaf::util::concurrent::CopyOnWriteArrayList< ServiceListener * >::removeAll(), decaf::util::AbstractSet< Resource * >::removeAll(), decaf::util::AbstractCollection< cms::Connection * >::removeAll(), decaf::util::concurrent::CopyOnWriteArrayList< ServiceListener * >::retainAll(), and decaf::util::AbstractCollection< cms::Connection * >::retainAll().
virtual bool decaf::util::Collection< E >::containsAll | ( | const Collection< E > & | collection | ) | const [pure virtual] |
Returns true if this collection contains all of the elements in the specified collection.
collection | The Collection to compare to this one. |
NullPointerException | if the Collection contains pointers and the Collection does not allow for NULL elements (optional check). |
Implemented in decaf::util::AbstractCollection< E >, decaf::util::concurrent::CopyOnWriteArrayList< E >, decaf::util::concurrent::CopyOnWriteArraySet< E >, decaf::util::concurrent::SynchronousQueue< E >, decaf::util::AbstractCollection< Pointer< Transport > >, decaf::util::AbstractCollection< Pointer< Synchronization > >, decaf::util::AbstractCollection< Resource * >, decaf::util::AbstractCollection< cms::MessageConsumer * >, decaf::util::AbstractCollection< CompositeTask * >, decaf::util::AbstractCollection< URI >, decaf::util::AbstractCollection< Pointer< MessageDispatch > >, decaf::util::AbstractCollection< Pointer< DestinationInfo > >, decaf::util::AbstractCollection< PrimitiveValueNode >, decaf::util::AbstractCollection< Pointer< Command > >, decaf::util::AbstractCollection< Pointer< BackupTransport > >, decaf::util::AbstractCollection< cms::MessageProducer * >, decaf::util::AbstractCollection< cms::Destination * >, decaf::util::AbstractCollection< cms::Session * >, decaf::util::AbstractCollection< cms::Connection * >, and decaf::util::concurrent::CopyOnWriteArrayList< ServiceListener * >.
virtual void decaf::util::Collection< E >::copy | ( | const Collection< E > & | collection | ) | [pure virtual] |
Renders this Collection as a Copy of the given Collection.
collection | The collection to mirror. |
UnsupportedOperationExceptio | if this is an unmodifiable collection. |
IllegalStateException | if the elements cannot be added at this time due to insertion restrictions. |
Implemented in decaf::util::AbstractCollection< E >, decaf::util::concurrent::CopyOnWriteArrayList< E >, decaf::util::concurrent::CopyOnWriteArraySet< E >, decaf::util::LinkedList< E >, decaf::util::StlList< E >, decaf::util::StlSet< E >, decaf::util::AbstractCollection< Pointer< Transport > >, decaf::util::AbstractCollection< Pointer< Synchronization > >, decaf::util::AbstractCollection< Resource * >, decaf::util::AbstractCollection< cms::MessageConsumer * >, decaf::util::AbstractCollection< CompositeTask * >, decaf::util::AbstractCollection< URI >, decaf::util::AbstractCollection< Pointer< MessageDispatch > >, decaf::util::AbstractCollection< Pointer< DestinationInfo > >, decaf::util::AbstractCollection< PrimitiveValueNode >, decaf::util::AbstractCollection< Pointer< Command > >, decaf::util::AbstractCollection< Pointer< BackupTransport > >, decaf::util::AbstractCollection< cms::MessageProducer * >, decaf::util::AbstractCollection< cms::Destination * >, decaf::util::AbstractCollection< cms::Session * >, decaf::util::AbstractCollection< cms::Connection * >, decaf::util::concurrent::CopyOnWriteArrayList< ServiceListener * >, decaf::util::LinkedList< Pointer< Transport > >, decaf::util::LinkedList< cms::MessageConsumer * >, decaf::util::LinkedList< CompositeTask * >, decaf::util::LinkedList< URI >, decaf::util::LinkedList< Pointer< MessageDispatch > >, decaf::util::LinkedList< Pointer< DestinationInfo > >, decaf::util::LinkedList< PrimitiveValueNode >, decaf::util::LinkedList< Pointer< Command > >, decaf::util::LinkedList< Pointer< BackupTransport > >, decaf::util::LinkedList< cms::MessageProducer * >, decaf::util::LinkedList< cms::Destination * >, decaf::util::LinkedList< cms::Session * >, decaf::util::LinkedList< cms::Connection * >, decaf::util::StlSet< Pointer< Synchronization > >, and decaf::util::StlSet< Resource * >.
virtual bool decaf::util::Collection< E >::equals | ( | const Collection< E > & | value | ) | const [pure virtual] |
Compares the passed collection to this one, if they contain the same elements, i.e.
all their elements are equivalent, then it returns true.
Implemented in decaf::util::AbstractCollection< E >, decaf::util::concurrent::CopyOnWriteArrayList< E >, decaf::util::concurrent::CopyOnWriteArraySet< E >, decaf::util::concurrent::SynchronousQueue< E >, decaf::util::StlList< E >, decaf::util::StlSet< E >, decaf::util::AbstractCollection< Pointer< Transport > >, decaf::util::AbstractCollection< Pointer< Synchronization > >, decaf::util::AbstractCollection< Resource * >, decaf::util::AbstractCollection< cms::MessageConsumer * >, decaf::util::AbstractCollection< CompositeTask * >, decaf::util::AbstractCollection< URI >, decaf::util::AbstractCollection< Pointer< MessageDispatch > >, decaf::util::AbstractCollection< Pointer< DestinationInfo > >, decaf::util::AbstractCollection< PrimitiveValueNode >, decaf::util::AbstractCollection< Pointer< Command > >, decaf::util::AbstractCollection< Pointer< BackupTransport > >, decaf::util::AbstractCollection< cms::MessageProducer * >, decaf::util::AbstractCollection< cms::Destination * >, decaf::util::AbstractCollection< cms::Session * >, decaf::util::AbstractCollection< cms::Connection * >, decaf::util::concurrent::CopyOnWriteArrayList< ServiceListener * >, decaf::util::StlSet< Pointer< Synchronization > >, and decaf::util::StlSet< Resource * >.
virtual bool decaf::util::Collection< E >::isEmpty | ( | ) | const [pure virtual] |
Implemented in decaf::util::AbstractCollection< E >, decaf::util::ArrayList< E >, decaf::util::concurrent::CopyOnWriteArrayList< E >, decaf::util::concurrent::CopyOnWriteArraySet< E >, decaf::util::concurrent::SynchronousQueue< E >, decaf::util::LinkedList< E >, decaf::util::StlList< E >, decaf::util::StlSet< E >, decaf::util::AbstractCollection< Pointer< Transport > >, decaf::util::AbstractCollection< Pointer< Synchronization > >, decaf::util::AbstractCollection< Resource * >, decaf::util::AbstractCollection< cms::MessageConsumer * >, decaf::util::AbstractCollection< CompositeTask * >, decaf::util::AbstractCollection< URI >, decaf::util::AbstractCollection< Pointer< MessageDispatch > >, decaf::util::AbstractCollection< Pointer< DestinationInfo > >, decaf::util::AbstractCollection< PrimitiveValueNode >, decaf::util::AbstractCollection< Pointer< Command > >, decaf::util::AbstractCollection< Pointer< BackupTransport > >, decaf::util::AbstractCollection< cms::MessageProducer * >, decaf::util::AbstractCollection< cms::Destination * >, decaf::util::AbstractCollection< cms::Session * >, decaf::util::AbstractCollection< cms::Connection * >, decaf::util::concurrent::CopyOnWriteArrayList< ServiceListener * >, decaf::util::LinkedList< Pointer< Transport > >, decaf::util::LinkedList< cms::MessageConsumer * >, decaf::util::LinkedList< CompositeTask * >, decaf::util::LinkedList< URI >, decaf::util::LinkedList< Pointer< MessageDispatch > >, decaf::util::LinkedList< Pointer< DestinationInfo > >, decaf::util::LinkedList< PrimitiveValueNode >, decaf::util::LinkedList< Pointer< Command > >, decaf::util::LinkedList< Pointer< BackupTransport > >, decaf::util::LinkedList< cms::MessageProducer * >, decaf::util::LinkedList< cms::Destination * >, decaf::util::LinkedList< cms::Session * >, decaf::util::LinkedList< cms::Connection * >, decaf::util::StlSet< Pointer< Synchronization > >, and decaf::util::StlSet< Resource * >.
Referenced by decaf::util::StlList< E >::addAll(), decaf::util::AbstractList< cms::Connection * >::addAll(), decaf::util::concurrent::SynchronousQueue< E >::containsAll(), decaf::util::concurrent::CopyOnWriteArrayList< ServiceListener * >::removeAll(), and decaf::util::concurrent::CopyOnWriteArrayList< ServiceListener * >::retainAll().
virtual bool decaf::util::Collection< E >::remove | ( | const E & | value | ) | [pure virtual] |
Removes a single instance of the specified element from the collection.
More formally, removes an element e such that (value == NULL ? e == NULL : value == e), if this collection contains one or more such elements. Returns true if this collection contained the specified element (or equivalently, if this collection changed as a result of the call).
value | The reference to the element to remove from this Collection. |
UnsupportedOperationExceptio | if this is an unmodifiable collection. |
NullPointerException | if the Collection is a container of pointers and does not allow NULL values. |
Implemented in decaf::util::AbstractCollection< E >, decaf::util::ArrayList< E >, decaf::util::concurrent::CopyOnWriteArrayList< E >, decaf::util::concurrent::CopyOnWriteArraySet< E >, decaf::util::concurrent::LinkedBlockingQueue< E >, decaf::util::LinkedList< E >, decaf::util::PriorityQueue< E >, decaf::util::StlList< E >, decaf::util::StlSet< E >, decaf::util::AbstractCollection< Pointer< Transport > >, decaf::util::AbstractCollection< Pointer< Synchronization > >, decaf::util::AbstractCollection< Resource * >, decaf::util::AbstractCollection< cms::MessageConsumer * >, decaf::util::AbstractCollection< CompositeTask * >, decaf::util::AbstractCollection< URI >, decaf::util::AbstractCollection< Pointer< MessageDispatch > >, decaf::util::AbstractCollection< Pointer< DestinationInfo > >, decaf::util::AbstractCollection< PrimitiveValueNode >, decaf::util::AbstractCollection< Pointer< Command > >, decaf::util::AbstractCollection< Pointer< BackupTransport > >, decaf::util::AbstractCollection< cms::MessageProducer * >, decaf::util::AbstractCollection< cms::Destination * >, decaf::util::AbstractCollection< cms::Session * >, decaf::util::AbstractCollection< cms::Connection * >, decaf::util::concurrent::CopyOnWriteArrayList< ServiceListener * >, decaf::util::LinkedList< Pointer< Transport > >, decaf::util::LinkedList< cms::MessageConsumer * >, decaf::util::LinkedList< CompositeTask * >, decaf::util::LinkedList< URI >, decaf::util::LinkedList< Pointer< MessageDispatch > >, decaf::util::LinkedList< Pointer< DestinationInfo > >, decaf::util::LinkedList< PrimitiveValueNode >, decaf::util::LinkedList< Pointer< Command > >, decaf::util::LinkedList< Pointer< BackupTransport > >, decaf::util::LinkedList< cms::MessageProducer * >, decaf::util::LinkedList< cms::Destination * >, decaf::util::LinkedList< cms::Session * >, decaf::util::LinkedList< cms::Connection * >, decaf::util::StlSet< Pointer< Synchronization > >, and decaf::util::StlSet< Resource * >.
virtual bool decaf::util::Collection< E >::removeAll | ( | const Collection< E > & | collection | ) | [pure virtual] |
Removes all this collection's elements that are also contained in the specified collection (optional operation).
After this call returns, this collection will contain no elements in common with the specified collection.
collection | The Collection whose elements are to be removed from this one. |
UnsupportedOperationExceptio | if this is an unmodifiable collection. |
NullPointerException | if the Collection is a container of pointers and does not allow NULL values. |
Implemented in decaf::util::AbstractCollection< E >, decaf::util::AbstractSet< E >, decaf::util::concurrent::CopyOnWriteArrayList< E >, decaf::util::concurrent::CopyOnWriteArraySet< E >, decaf::util::AbstractCollection< Pointer< Transport > >, decaf::util::AbstractCollection< Pointer< Synchronization > >, decaf::util::AbstractCollection< Resource * >, decaf::util::AbstractCollection< cms::MessageConsumer * >, decaf::util::AbstractCollection< CompositeTask * >, decaf::util::AbstractCollection< URI >, decaf::util::AbstractCollection< Pointer< MessageDispatch > >, decaf::util::AbstractCollection< Pointer< DestinationInfo > >, decaf::util::AbstractCollection< PrimitiveValueNode >, decaf::util::AbstractCollection< Pointer< Command > >, decaf::util::AbstractCollection< Pointer< BackupTransport > >, decaf::util::AbstractCollection< cms::MessageProducer * >, decaf::util::AbstractCollection< cms::Destination * >, decaf::util::AbstractCollection< cms::Session * >, decaf::util::AbstractCollection< cms::Connection * >, decaf::util::AbstractSet< Pointer< Synchronization > >, decaf::util::AbstractSet< Resource * >, and decaf::util::concurrent::CopyOnWriteArrayList< ServiceListener * >.
virtual bool decaf::util::Collection< E >::retainAll | ( | const Collection< E > & | collection | ) | [pure virtual] |
Retains only the elements in this collection that are contained in the specified collection (optional operation).
In other words, removes from this collection all of its elements that are not contained in the specified collection.
collection | The Collection whose elements are to be retained. |
UnsupportedOperationExceptio | if this is an unmodifiable collection. |
NullPointerException | if the Collection is a container of pointers and does not allow NULL values. |
Implemented in decaf::util::AbstractCollection< E >, decaf::util::concurrent::CopyOnWriteArrayList< E >, decaf::util::concurrent::CopyOnWriteArraySet< E >, decaf::util::AbstractCollection< Pointer< Transport > >, decaf::util::AbstractCollection< Pointer< Synchronization > >, decaf::util::AbstractCollection< Resource * >, decaf::util::AbstractCollection< cms::MessageConsumer * >, decaf::util::AbstractCollection< CompositeTask * >, decaf::util::AbstractCollection< URI >, decaf::util::AbstractCollection< Pointer< MessageDispatch > >, decaf::util::AbstractCollection< Pointer< DestinationInfo > >, decaf::util::AbstractCollection< PrimitiveValueNode >, decaf::util::AbstractCollection< Pointer< Command > >, decaf::util::AbstractCollection< Pointer< BackupTransport > >, decaf::util::AbstractCollection< cms::MessageProducer * >, decaf::util::AbstractCollection< cms::Destination * >, decaf::util::AbstractCollection< cms::Session * >, decaf::util::AbstractCollection< cms::Connection * >, and decaf::util::concurrent::CopyOnWriteArrayList< ServiceListener * >.
virtual int decaf::util::Collection< E >::size | ( | ) | const [pure virtual] |
Returns the number of elements in this collection.
If this collection contains more than Integer::MAX_VALUE elements, returns Integer::MAX_VALUE.
Implemented in decaf::util::ArrayList< E >, decaf::util::concurrent::CopyOnWriteArrayList< E >, decaf::util::concurrent::CopyOnWriteArraySet< E >, decaf::util::concurrent::LinkedBlockingQueue< E >, decaf::util::concurrent::SynchronousQueue< E >, decaf::util::LinkedList< E >, decaf::util::PriorityQueue< E >, decaf::util::StlList< E >, decaf::util::StlSet< E >, decaf::util::concurrent::CopyOnWriteArrayList< ServiceListener * >, decaf::util::LinkedList< Pointer< Transport > >, decaf::util::LinkedList< cms::MessageConsumer * >, decaf::util::LinkedList< CompositeTask * >, decaf::util::LinkedList< URI >, decaf::util::LinkedList< Pointer< MessageDispatch > >, decaf::util::LinkedList< Pointer< DestinationInfo > >, decaf::util::LinkedList< PrimitiveValueNode >, decaf::util::LinkedList< Pointer< Command > >, decaf::util::LinkedList< Pointer< BackupTransport > >, decaf::util::LinkedList< cms::MessageProducer * >, decaf::util::LinkedList< cms::Destination * >, decaf::util::LinkedList< cms::Session * >, decaf::util::LinkedList< cms::Connection * >, decaf::util::StlSet< Pointer< Synchronization > >, and decaf::util::StlSet< Resource * >.
Referenced by decaf::util::AbstractList< cms::Connection * >::add(), decaf::util::concurrent::CopyOnWriteArrayList< ServiceListener * >::addAll(), decaf::util::ArrayList< E >::addAll(), decaf::util::concurrent::CopyOnWriteArrayList< ServiceListener * >::addAllAbsent(), decaf::util::ArrayList< E >::ArrayList(), decaf::util::AbstractList< cms::Connection * >::clear(), decaf::util::concurrent::CopyOnWriteArraySet< E >::equals(), decaf::util::concurrent::CopyOnWriteArrayList< ServiceListener * >::equals(), decaf::util::AbstractCollection< cms::Connection * >::equals(), decaf::util::AbstractCollection< cms::Connection * >::isEmpty(), decaf::util::AbstractList< cms::Connection * >::lastIndexOf(), decaf::util::AbstractSet< Resource * >::removeAll(), and decaf::util::AbstractCollection< cms::Connection * >::toArray().
virtual std::vector<E> decaf::util::Collection< E >::toArray | ( | ) | const [pure virtual] |
Returns an array containing all of the elements in this collection.
If the collection makes any guarantees as to what order its elements are returned by its iterator, this method must return the elements in the same order.
This method acts as bridge between array-based and collection-based APIs.
Implemented in decaf::util::AbstractCollection< E >, decaf::util::ArrayList< E >, decaf::util::concurrent::CopyOnWriteArrayList< E >, decaf::util::concurrent::CopyOnWriteArraySet< E >, decaf::util::concurrent::LinkedBlockingQueue< E >, decaf::util::concurrent::SynchronousQueue< E >, decaf::util::LinkedList< E >, decaf::util::AbstractCollection< Pointer< Transport > >, decaf::util::AbstractCollection< Pointer< Synchronization > >, decaf::util::AbstractCollection< Resource * >, decaf::util::AbstractCollection< cms::MessageConsumer * >, decaf::util::AbstractCollection< CompositeTask * >, decaf::util::AbstractCollection< URI >, decaf::util::AbstractCollection< Pointer< MessageDispatch > >, decaf::util::AbstractCollection< Pointer< DestinationInfo > >, decaf::util::AbstractCollection< PrimitiveValueNode >, decaf::util::AbstractCollection< Pointer< Command > >, decaf::util::AbstractCollection< Pointer< BackupTransport > >, decaf::util::AbstractCollection< cms::MessageProducer * >, decaf::util::AbstractCollection< cms::Destination * >, decaf::util::AbstractCollection< cms::Session * >, decaf::util::AbstractCollection< cms::Connection * >, decaf::util::concurrent::CopyOnWriteArrayList< ServiceListener * >, decaf::util::LinkedList< Pointer< Transport > >, decaf::util::LinkedList< cms::MessageConsumer * >, decaf::util::LinkedList< CompositeTask * >, decaf::util::LinkedList< URI >, decaf::util::LinkedList< Pointer< MessageDispatch > >, decaf::util::LinkedList< Pointer< DestinationInfo > >, decaf::util::LinkedList< PrimitiveValueNode >, decaf::util::LinkedList< Pointer< Command > >, decaf::util::LinkedList< Pointer< BackupTransport > >, decaf::util::LinkedList< cms::MessageProducer * >, decaf::util::LinkedList< cms::Destination * >, decaf::util::LinkedList< cms::Session * >, and decaf::util::LinkedList< cms::Connection * >.
Referenced by decaf::util::StlList< E >::addAll(), and decaf::util::ArrayList< E >::addAll().