activemq-cpp-3.6.0
decaf::util::Collection< E > Class Template Reference

The root interface in the collection hierarchy. More...

#include <src/main/decaf/util/Collection.h>

Inheritance diagram for decaf::util::Collection< E >:

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.
- Public Member Functions inherited from decaf::lang::Iterable< E >
virtual ~Iterable ()
virtual decaf::util::Iterator
< E > * 
iterator ()=0
virtual decaf::util::Iterator
< E > * 
iterator () const =0
- Public Member Functions inherited from decaf::util::concurrent::Synchronizable
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.

Detailed Description

template<typename E>
class decaf::util::Collection< E >

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))."

Since
1.0

Constructor & Destructor Documentation

template<typename E>
virtual decaf::util::Collection< E >::~Collection ( )
inlinevirtual

Member Function Documentation

template<typename E>
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.

Parameters
valueThe reference to the element to add to this Collection.
Returns
true if the element was added to this Collection.
Exceptions
UnsupportedOperationExceptioif this is an unmodifiable collection.
NullPointerExceptionif the Collection is a container of pointers and does not allow NULL values.
IllegalArgumentExceptionif some property of the element prevents it from being added to this collection
IllegalStateExceptionif the element cannot be added at this time due to insertion restrictions.

Implemented in decaf::util::StlList< E >, decaf::util::AbstractList< E >, decaf::util::AbstractList< ServiceListener * >, 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< decaf::net::URI >, decaf::util::AbstractList< Pointer< Command > >, decaf::util::AbstractList< cms::MessageProducer * >, decaf::util::AbstractList< cms::Destination * >, decaf::util::AbstractList< cms::Session * >, decaf::util::AbstractList< Pointer< ActiveMQDestination > >, decaf::util::AbstractList< cms::Connection * >, decaf::util::concurrent::CopyOnWriteArrayList< E >, decaf::util::StlSet< E >, decaf::util::StlSet< Pointer< Synchronization > >, decaf::util::StlSet< Resource * >, decaf::util::ArrayList< E >, decaf::util::ArrayList< ServiceListener * >, decaf::util::ArrayList< Pointer< ActiveMQDestination > >, decaf::util::LinkedList< E >, 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< decaf::net::URI >, decaf::util::LinkedList< Pointer< Command > >, decaf::util::LinkedList< cms::MessageProducer * >, decaf::util::LinkedList< cms::Destination * >, decaf::util::LinkedList< cms::Session * >, decaf::util::LinkedList< cms::Connection * >, decaf::util::concurrent::CopyOnWriteArraySet< E >, decaf::util::AbstractQueue< E >, and decaf::util::AbstractQueue< Pointer< Transport > >.

Referenced by decaf::util::concurrent::SynchronousQueue< E >::drainTo(), and decaf::util::concurrent::LinkedBlockingQueue< Pointer< Transport > >::drainTo().

template<typename E>
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.)

Parameters
collectionThe Collection whose elements are added to this one.
Returns
true if this collection changed as a result of the call
Exceptions
UnsupportedOperationExceptioif this is an unmodifiable collection.
NullPointerExceptionif the Collection is a container of pointers and does not allow NULL values.
IllegalArgumentExceptionif some property of an element prevents it from being added to this collection
IllegalStateExceptionif an element cannot be added at this time due to insertion restrictions.

Implemented in decaf::util::StlList< E >, decaf::util::concurrent::CopyOnWriteArrayList< E >, decaf::util::ArrayList< E >, decaf::util::ArrayList< ServiceListener * >, decaf::util::ArrayList< Pointer< ActiveMQDestination > >, decaf::util::AbstractCollection< E >, decaf::util::AbstractCollection< ServiceListener * >, 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< V >, decaf::util::AbstractCollection< MapEntry< K, V > >, decaf::util::AbstractCollection< decaf::net::URI >, decaf::util::AbstractCollection< Pointer< Command > >, decaf::util::AbstractCollection< cms::MessageProducer * >, decaf::util::AbstractCollection< cms::Destination * >, decaf::util::AbstractCollection< cms::Session * >, decaf::util::AbstractCollection< Pointer< ActiveMQDestination > >, decaf::util::AbstractCollection< cms::Connection * >, decaf::util::AbstractCollection< K >, decaf::util::LinkedList< E >, 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< decaf::net::URI >, decaf::util::LinkedList< Pointer< Command > >, decaf::util::LinkedList< cms::MessageProducer * >, decaf::util::LinkedList< cms::Destination * >, decaf::util::LinkedList< cms::Session * >, decaf::util::LinkedList< cms::Connection * >, decaf::util::concurrent::CopyOnWriteArraySet< E >, decaf::util::AbstractQueue< E >, and decaf::util::AbstractQueue< Pointer< Transport > >.

template<typename E>
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.

Exceptions
UnsupportedOperationExceptioif this is an unmodifiable collection.

Implemented in decaf::util::AbstractList< E >, decaf::util::AbstractList< ServiceListener * >, 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< decaf::net::URI >, decaf::util::AbstractList< Pointer< Command > >, decaf::util::AbstractList< cms::MessageProducer * >, decaf::util::AbstractList< cms::Destination * >, decaf::util::AbstractList< cms::Session * >, decaf::util::AbstractList< Pointer< ActiveMQDestination > >, decaf::util::AbstractList< cms::Connection * >, decaf::util::StlList< E >, decaf::util::concurrent::LinkedBlockingQueue< E >, decaf::util::concurrent::LinkedBlockingQueue< Pointer< Transport > >, decaf::util::concurrent::CopyOnWriteArrayList< E >, decaf::util::concurrent::SynchronousQueue< E >, decaf::util::LinkedList< E >, 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< decaf::net::URI >, decaf::util::LinkedList< Pointer< Command > >, decaf::util::LinkedList< cms::MessageProducer * >, decaf::util::LinkedList< cms::Destination * >, decaf::util::LinkedList< cms::Session * >, decaf::util::LinkedList< cms::Connection * >, decaf::util::StlSet< E >, decaf::util::StlSet< Pointer< Synchronization > >, decaf::util::StlSet< Resource * >, decaf::util::ArrayList< E >, decaf::util::ArrayList< ServiceListener * >, decaf::util::ArrayList< Pointer< ActiveMQDestination > >, decaf::util::AbstractQueue< E >, decaf::util::AbstractQueue< Pointer< Transport > >, decaf::util::AbstractCollection< E >, decaf::util::concurrent::CopyOnWriteArraySet< E >, decaf::util::AbstractCollection< ServiceListener * >, 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< V >, decaf::util::AbstractCollection< MapEntry< K, V > >, decaf::util::AbstractCollection< decaf::net::URI >, decaf::util::AbstractCollection< Pointer< Command > >, decaf::util::AbstractCollection< cms::MessageProducer * >, decaf::util::AbstractCollection< cms::Destination * >, decaf::util::AbstractCollection< cms::Session * >, decaf::util::AbstractCollection< Pointer< ActiveMQDestination > >, decaf::util::AbstractCollection< cms::Connection * >, and decaf::util::AbstractCollection< K >.

template<typename E>
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 ).

Parameters
valueThe value to check for presence in the collection.
Returns
true if there is at least one of the elements in the collection
Exceptions
NullPointerExceptionif the Collection contains pointers and the Collection does not allow for NULL elements (optional check).

Implemented in decaf::util::StlList< E >, decaf::util::ArrayList< E >, decaf::util::ArrayList< ServiceListener * >, decaf::util::ArrayList< Pointer< ActiveMQDestination > >, decaf::util::concurrent::CopyOnWriteArrayList< E >, decaf::util::LinkedList< E >, 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< decaf::net::URI >, decaf::util::LinkedList< Pointer< Command > >, decaf::util::LinkedList< cms::MessageProducer * >, decaf::util::LinkedList< cms::Destination * >, decaf::util::LinkedList< cms::Session * >, decaf::util::LinkedList< cms::Connection * >, decaf::util::StlSet< E >, decaf::util::StlSet< Pointer< Synchronization > >, decaf::util::StlSet< Resource * >, decaf::util::AbstractCollection< E >, decaf::util::AbstractCollection< ServiceListener * >, 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< V >, decaf::util::AbstractCollection< MapEntry< K, V > >, decaf::util::AbstractCollection< decaf::net::URI >, decaf::util::AbstractCollection< Pointer< Command > >, decaf::util::AbstractCollection< cms::MessageProducer * >, decaf::util::AbstractCollection< cms::Destination * >, decaf::util::AbstractCollection< cms::Session * >, decaf::util::AbstractCollection< Pointer< ActiveMQDestination > >, decaf::util::AbstractCollection< cms::Connection * >, decaf::util::AbstractCollection< K >, and decaf::util::concurrent::CopyOnWriteArraySet< E >.

Referenced by decaf::util::AbstractSet< K >::removeAll(), decaf::util::AbstractCollection< K >::removeAll(), decaf::util::concurrent::CopyOnWriteArrayList< E >::removeAll(), decaf::util::AbstractCollection< K >::retainAll(), and decaf::util::concurrent::CopyOnWriteArrayList< E >::retainAll().

template<typename E>
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.

Parameters
collectionThe Collection to compare to this one.
Exceptions
NullPointerExceptionif the Collection contains pointers and the Collection does not allow for NULL elements (optional check).

Implemented in decaf::util::concurrent::CopyOnWriteArrayList< E >, decaf::util::concurrent::SynchronousQueue< E >, decaf::util::AbstractCollection< E >, decaf::util::AbstractCollection< ServiceListener * >, 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< V >, decaf::util::AbstractCollection< MapEntry< K, V > >, decaf::util::AbstractCollection< decaf::net::URI >, decaf::util::AbstractCollection< Pointer< Command > >, decaf::util::AbstractCollection< cms::MessageProducer * >, decaf::util::AbstractCollection< cms::Destination * >, decaf::util::AbstractCollection< cms::Session * >, decaf::util::AbstractCollection< Pointer< ActiveMQDestination > >, decaf::util::AbstractCollection< cms::Connection * >, decaf::util::AbstractCollection< K >, and decaf::util::concurrent::CopyOnWriteArraySet< E >.

template<typename E>
virtual void decaf::util::Collection< E >::copy ( const Collection< E > &  collection)
pure virtual

Renders this Collection as a Copy of the given Collection.

Parameters
collectionThe collection to mirror.
Exceptions
UnsupportedOperationExceptioif this is an unmodifiable collection.
IllegalStateExceptionif the elements cannot be added at this time due to insertion restrictions.

Implemented in decaf::util::StlList< E >, decaf::util::concurrent::CopyOnWriteArrayList< E >, decaf::util::LinkedList< E >, 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< decaf::net::URI >, decaf::util::LinkedList< Pointer< Command > >, decaf::util::LinkedList< cms::MessageProducer * >, decaf::util::LinkedList< cms::Destination * >, decaf::util::LinkedList< cms::Session * >, decaf::util::LinkedList< cms::Connection * >, decaf::util::StlSet< E >, decaf::util::StlSet< Pointer< Synchronization > >, decaf::util::StlSet< Resource * >, decaf::util::AbstractCollection< E >, decaf::util::AbstractCollection< ServiceListener * >, 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< V >, decaf::util::AbstractCollection< MapEntry< K, V > >, decaf::util::AbstractCollection< decaf::net::URI >, decaf::util::AbstractCollection< Pointer< Command > >, decaf::util::AbstractCollection< cms::MessageProducer * >, decaf::util::AbstractCollection< cms::Destination * >, decaf::util::AbstractCollection< cms::Session * >, decaf::util::AbstractCollection< Pointer< ActiveMQDestination > >, decaf::util::AbstractCollection< cms::Connection * >, decaf::util::AbstractCollection< K >, and decaf::util::concurrent::CopyOnWriteArraySet< E >.

template<typename E>
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.

Returns
true if the Collections contain the same elements.

Implemented in decaf::util::concurrent::CopyOnWriteArrayList< E >, decaf::util::StlList< E >, decaf::util::concurrent::SynchronousQueue< E >, decaf::util::StlSet< E >, decaf::util::StlSet< Pointer< Synchronization > >, decaf::util::StlSet< Resource * >, decaf::util::AbstractCollection< E >, decaf::util::AbstractCollection< ServiceListener * >, 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< V >, decaf::util::AbstractCollection< MapEntry< K, V > >, decaf::util::AbstractCollection< decaf::net::URI >, decaf::util::AbstractCollection< Pointer< Command > >, decaf::util::AbstractCollection< cms::MessageProducer * >, decaf::util::AbstractCollection< cms::Destination * >, decaf::util::AbstractCollection< cms::Session * >, decaf::util::AbstractCollection< Pointer< ActiveMQDestination > >, decaf::util::AbstractCollection< cms::Connection * >, decaf::util::AbstractCollection< K >, and decaf::util::concurrent::CopyOnWriteArraySet< E >.

template<typename E>
virtual bool decaf::util::Collection< E >::isEmpty ( ) const
pure virtual
Returns
true if this collection contains no elements.

Implemented in decaf::util::concurrent::CopyOnWriteArrayList< E >, decaf::util::StlList< E >, decaf::util::concurrent::SynchronousQueue< E >, decaf::util::StlSet< E >, decaf::util::StlSet< Pointer< Synchronization > >, decaf::util::StlSet< Resource * >, decaf::util::LinkedList< E >, 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< decaf::net::URI >, decaf::util::LinkedList< Pointer< Command > >, decaf::util::LinkedList< cms::MessageProducer * >, decaf::util::LinkedList< cms::Destination * >, decaf::util::LinkedList< cms::Session * >, decaf::util::LinkedList< cms::Connection * >, decaf::util::AbstractCollection< E >, decaf::util::AbstractCollection< ServiceListener * >, 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< V >, decaf::util::AbstractCollection< MapEntry< K, V > >, decaf::util::AbstractCollection< decaf::net::URI >, decaf::util::AbstractCollection< Pointer< Command > >, decaf::util::AbstractCollection< cms::MessageProducer * >, decaf::util::AbstractCollection< cms::Destination * >, decaf::util::AbstractCollection< cms::Session * >, decaf::util::AbstractCollection< Pointer< ActiveMQDestination > >, decaf::util::AbstractCollection< cms::Connection * >, decaf::util::AbstractCollection< K >, decaf::util::ArrayList< E >, decaf::util::ArrayList< ServiceListener * >, decaf::util::ArrayList< Pointer< ActiveMQDestination > >, and decaf::util::concurrent::CopyOnWriteArraySet< E >.

Referenced by decaf::util::AbstractList< cms::Connection * >::addAll(), decaf::util::StlList< E >::addAll(), decaf::util::concurrent::SynchronousQueue< E >::containsAll(), decaf::util::concurrent::CopyOnWriteArrayList< E >::removeAll(), and decaf::util::concurrent::CopyOnWriteArrayList< E >::retainAll().

template<typename E>
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).

Parameters
valueThe reference to the element to remove from this Collection.
Returns
true if the collection was changed, false otherwise.
Exceptions
UnsupportedOperationExceptioif this is an unmodifiable collection.
NullPointerExceptionif the Collection is a container of pointers and does not allow NULL values.

Implemented in decaf::util::concurrent::LinkedBlockingQueue< E >, decaf::util::StlList< E >, decaf::util::concurrent::CopyOnWriteArrayList< E >, decaf::util::ArrayList< E >, decaf::util::ArrayList< ServiceListener * >, decaf::util::ArrayList< Pointer< ActiveMQDestination > >, decaf::util::AbstractCollection< E >, decaf::util::AbstractCollection< ServiceListener * >, 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< V >, decaf::util::AbstractCollection< MapEntry< K, V > >, decaf::util::AbstractCollection< decaf::net::URI >, decaf::util::AbstractCollection< Pointer< Command > >, decaf::util::AbstractCollection< cms::MessageProducer * >, decaf::util::AbstractCollection< cms::Destination * >, decaf::util::AbstractCollection< cms::Session * >, decaf::util::AbstractCollection< Pointer< ActiveMQDestination > >, decaf::util::AbstractCollection< cms::Connection * >, decaf::util::AbstractCollection< K >, decaf::util::StlSet< E >, decaf::util::StlSet< Pointer< Synchronization > >, decaf::util::StlSet< Resource * >, decaf::util::LinkedList< E >, 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< decaf::net::URI >, decaf::util::LinkedList< Pointer< Command > >, decaf::util::LinkedList< cms::MessageProducer * >, decaf::util::LinkedList< cms::Destination * >, decaf::util::LinkedList< cms::Session * >, decaf::util::LinkedList< cms::Connection * >, and decaf::util::concurrent::CopyOnWriteArraySet< E >.

template<typename E>
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.

Parameters
collectionThe Collection whose elements are to be removed from this one.
Returns
true if the collection changed as a result of this call.
Exceptions
UnsupportedOperationExceptioif this is an unmodifiable collection.
NullPointerExceptionif the Collection is a container of pointers and does not allow NULL values.

Implemented in decaf::util::concurrent::CopyOnWriteArrayList< E >, decaf::util::AbstractCollection< E >, decaf::util::AbstractCollection< ServiceListener * >, 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< V >, decaf::util::AbstractCollection< MapEntry< K, V > >, decaf::util::AbstractCollection< decaf::net::URI >, decaf::util::AbstractCollection< Pointer< Command > >, decaf::util::AbstractCollection< cms::MessageProducer * >, decaf::util::AbstractCollection< cms::Destination * >, decaf::util::AbstractCollection< cms::Session * >, decaf::util::AbstractCollection< Pointer< ActiveMQDestination > >, decaf::util::AbstractCollection< cms::Connection * >, decaf::util::AbstractCollection< K >, decaf::util::concurrent::CopyOnWriteArraySet< E >, decaf::util::AbstractSet< E >, decaf::util::AbstractSet< Pointer< Synchronization > >, decaf::util::AbstractSet< Resource * >, decaf::util::AbstractSet< MapEntry< K, V > >, and decaf::util::AbstractSet< K >.

template<typename E>
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.

Parameters
collectionThe Collection whose elements are to be retained.
Returns
true if the collection changed as a result of this call.
Exceptions
UnsupportedOperationExceptioif this is an unmodifiable collection.
NullPointerExceptionif the Collection is a container of pointers and does not allow NULL values.

Implemented in decaf::util::concurrent::CopyOnWriteArrayList< E >, decaf::util::AbstractCollection< E >, decaf::util::AbstractCollection< ServiceListener * >, 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< V >, decaf::util::AbstractCollection< MapEntry< K, V > >, decaf::util::AbstractCollection< decaf::net::URI >, decaf::util::AbstractCollection< Pointer< Command > >, decaf::util::AbstractCollection< cms::MessageProducer * >, decaf::util::AbstractCollection< cms::Destination * >, decaf::util::AbstractCollection< cms::Session * >, decaf::util::AbstractCollection< Pointer< ActiveMQDestination > >, decaf::util::AbstractCollection< cms::Connection * >, decaf::util::AbstractCollection< K >, and decaf::util::concurrent::CopyOnWriteArraySet< E >.

template<typename E>
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.

Returns
the number of elements in this collection

Implemented in decaf::util::concurrent::CopyOnWriteArrayList< E >, decaf::util::StlList< E >, decaf::util::concurrent::LinkedBlockingQueue< E >, decaf::util::concurrent::LinkedBlockingQueue< Pointer< Transport > >, decaf::util::concurrent::SynchronousQueue< E >, decaf::util::StlSet< E >, decaf::util::StlSet< Pointer< Synchronization > >, decaf::util::StlSet< Resource * >, decaf::util::LinkedList< E >, 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< decaf::net::URI >, decaf::util::LinkedList< Pointer< Command > >, decaf::util::LinkedList< cms::MessageProducer * >, decaf::util::LinkedList< cms::Destination * >, decaf::util::LinkedList< cms::Session * >, decaf::util::LinkedList< cms::Connection * >, decaf::util::ArrayList< E >, decaf::util::ArrayList< ServiceListener * >, decaf::util::ArrayList< Pointer< ActiveMQDestination > >, and decaf::util::concurrent::CopyOnWriteArraySet< E >.

Referenced by decaf::util::AbstractList< cms::Connection * >::add(), decaf::util::ArrayList< Pointer< ActiveMQDestination > >::addAll(), decaf::util::concurrent::CopyOnWriteArrayList< E >::addAll(), decaf::util::concurrent::CopyOnWriteArrayList< E >::addAllAbsent(), decaf::util::ArrayList< Pointer< ActiveMQDestination > >::ArrayList(), decaf::util::AbstractList< cms::Connection * >::clear(), decaf::util::concurrent::CopyOnWriteArraySet< E >::equals(), decaf::util::AbstractCollection< K >::equals(), decaf::util::concurrent::CopyOnWriteArrayList< E >::equals(), decaf::util::AbstractCollection< K >::isEmpty(), decaf::util::AbstractList< cms::Connection * >::lastIndexOf(), decaf::util::AbstractSet< K >::removeAll(), and decaf::util::AbstractCollection< K >::toArray().

template<typename E>
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.

Returns
an array of the elements in this collection in the form of an STL vector.

Implemented in decaf::util::concurrent::LinkedBlockingQueue< E >, decaf::util::concurrent::LinkedBlockingQueue< Pointer< Transport > >, decaf::util::concurrent::CopyOnWriteArrayList< E >, decaf::util::ArrayList< E >, decaf::util::ArrayList< ServiceListener * >, decaf::util::ArrayList< Pointer< ActiveMQDestination > >, decaf::util::AbstractCollection< E >, decaf::util::AbstractCollection< ServiceListener * >, 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< V >, decaf::util::AbstractCollection< MapEntry< K, V > >, decaf::util::AbstractCollection< decaf::net::URI >, decaf::util::AbstractCollection< Pointer< Command > >, decaf::util::AbstractCollection< cms::MessageProducer * >, decaf::util::AbstractCollection< cms::Destination * >, decaf::util::AbstractCollection< cms::Session * >, decaf::util::AbstractCollection< Pointer< ActiveMQDestination > >, decaf::util::AbstractCollection< cms::Connection * >, decaf::util::AbstractCollection< K >, decaf::util::concurrent::SynchronousQueue< E >, decaf::util::LinkedList< E >, 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< decaf::net::URI >, decaf::util::LinkedList< Pointer< Command > >, decaf::util::LinkedList< cms::MessageProducer * >, decaf::util::LinkedList< cms::Destination * >, decaf::util::LinkedList< cms::Session * >, decaf::util::LinkedList< cms::Connection * >, and decaf::util::concurrent::CopyOnWriteArraySet< E >.

Referenced by decaf::util::ArrayList< Pointer< ActiveMQDestination > >::addAll(), and decaf::util::StlList< E >::addAll().


The documentation for this class was generated from the following file: