activemq-cpp-3.9.5
decaf::util::HashMap< K, V, HASHCODE >::HashMapValueCollection Class Reference

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

Inheritance diagram for decaf::util::HashMap< K, V, HASHCODE >::HashMapValueCollection:

Public Member Functions

 HashMapValueCollection (HashMap *parent)
 
virtual ~HashMapValueCollection ()
 
virtual bool contains (const V &value) const
 This implementation iterates over the elements in the collection, checking each element in turn for equality with the specified element. More...
 
virtual int size () const
 Returns the number of elements in this collection. More...
 
virtual void clear ()
 Removes all of the elements from this collection (optional operation). More...
 
virtual Iterator< V > * iterator ()
 
virtual Iterator< V > * iterator () const
 
- Public Member Functions inherited from decaf::util::AbstractCollection< V >
 AbstractCollection ()
 
 AbstractCollection (const AbstractCollection &other)
 Copy Constructor, copy element from the source collection to this collection after clearing any element stored in this collection. More...
 
virtual ~AbstractCollection ()
 
AbstractCollection< V > & operator= (const AbstractCollection< V > &collection)
 Assignment Operator, copy element from the source collection to this collection after clearing any element stored in this collection. More...
 
virtual bool containsAll (const Collection< V > &collection) const
 
virtual bool equals (const Collection< V > &collection) const
 Answers true if this Collection and the one given are the same size and if each element contained in the Collection given is equal to an element contained in this collection. More...
 
virtual void copy (const Collection< V > &collection)
 Renders this Collection as a Copy of the given Collection. More...
 
virtual bool isEmpty () const
 Returns true if this collection contains no elements. More...
 
virtual bool add (const V &value DECAF_UNUSED)
 
virtual bool addAll (const Collection< V > &collection)
 
virtual bool remove (const V &value)
 
virtual bool removeAll (const Collection< V > &collection)
 
virtual bool retainAll (const Collection< V > &collection)
 
virtual std::vector< V > toArray () const
 Answers an STL vector containing copies of all elements contained in this Collection. More...
 
virtual void lock ()
 Locks the object. More...
 
virtual bool tryLock ()
 Attempts to Lock the object, if the lock is already held by another thread than this method returns false. More...
 
virtual void unlock ()
 Unlocks the object. More...
 
virtual void wait ()
 Waits on a signal from this object, which is generated by a call to Notify. More...
 
virtual void wait (long long millisecs)
 Waits on a signal from this object, which is generated by a call to Notify. More...
 
virtual void wait (long long millisecs, int nanos)
 Waits on a signal from this object, which is generated by a call to Notify. More...
 
virtual void notify ()
 Signals a waiter on this object that it can now wake up and continue. More...
 
virtual void notifyAll ()
 Signals the waiters on this object that it can now wake up and continue. More...
 
- Public Member Functions inherited from decaf::util::Collection< E >
virtual ~Collection ()
 
virtual void copy (const Collection< E > &collection)=0
 Renders this Collection as a Copy of the given Collection. More...
 
virtual bool add (const E &value)=0
 Returns true if this collection changed as a result of the call. More...
 
virtual bool addAll (const Collection< E > &collection)=0
 Adds all of the elements in the specified collection to this collection. More...
 
virtual bool contains (const E &value) const =0
 Returns true if this collection contains the specified element. More...
 
virtual bool containsAll (const Collection< E > &collection) const =0
 Returns true if this collection contains all of the elements in the specified collection. More...
 
virtual bool equals (const Collection< E > &value) const =0
 Compares the passed collection to this one, if they contain the same elements, i.e. More...
 
virtual bool remove (const E &value)=0
 Removes a single instance of the specified element from the collection. More...
 
virtual bool removeAll (const Collection< E > &collection)=0
 Removes all this collection's elements that are also contained in the specified collection (optional operation). More...
 
virtual bool retainAll (const Collection< E > &collection)=0
 Retains only the elements in this collection that are contained in the specified collection (optional operation). More...
 
- Public Member Functions inherited from decaf::lang::Iterable< E >
virtual ~Iterable ()
 
- Public Member Functions inherited from decaf::util::concurrent::Synchronizable
virtual ~Synchronizable ()
 

Additional Inherited Members

- Protected Attributes inherited from decaf::util::AbstractCollection< V >
util::concurrent::Mutex mutex
 

Constructor & Destructor Documentation

◆ HashMapValueCollection()

template<typename K , typename V , typename HASHCODE = HashCode<K>>
decaf::util::HashMap< K, V, HASHCODE >::HashMapValueCollection::HashMapValueCollection ( HashMap parent)
inline

◆ ~HashMapValueCollection()

template<typename K , typename V , typename HASHCODE = HashCode<K>>
virtual decaf::util::HashMap< K, V, HASHCODE >::HashMapValueCollection::~HashMapValueCollection ( )
inlinevirtual

Member Function Documentation

◆ clear()

template<typename K , typename V , typename HASHCODE = HashCode<K>>
virtual void decaf::util::HashMap< K, V, HASHCODE >::HashMapValueCollection::clear ( )
inlinevirtual

Removes all of the elements from this collection (optional operation).

The collection will be empty after this method returns.

This implementation iterates over this collection, removing each element using the Iterator.remove operation. Most implementations will probably choose to override this method for efficiency.

Note that this implementation will throw an UnsupportedOperationException if the iterator returned by this collection's iterator method does not implement the remove method and this collection is non-empty.

Exceptions
UnsupportedOperationExceptionif the clear operation is not supported by this collection

Reimplemented from decaf::util::AbstractCollection< V >.

References decaf::util::HashMap< K, V, HASHCODE >::clear().

◆ contains()

template<typename K , typename V , typename HASHCODE = HashCode<K>>
virtual bool decaf::util::HashMap< K, V, HASHCODE >::HashMapValueCollection::contains ( const V &  value) const
inlinevirtual

This implementation iterates over the elements in the collection, checking each element in turn for equality with the specified element.

This implementation iterates over the elements in the collection, checking each element in turn for equality with the specified element.

Reimplemented from decaf::util::AbstractCollection< V >.

References decaf::util::HashMap< K, V, HASHCODE >::containsValue().

◆ iterator() [1/2]

template<typename K , typename V , typename HASHCODE = HashCode<K>>
virtual Iterator< V > * decaf::util::HashMap< K, V, HASHCODE >::HashMapValueCollection::iterator ( )
inlinevirtual
Returns
an iterator over a set of elements of type T.

Implements decaf::lang::Iterable< E >.

◆ iterator() [2/2]

template<typename K , typename V , typename HASHCODE = HashCode<K>>
virtual Iterator< V > * decaf::util::HashMap< K, V, HASHCODE >::HashMapValueCollection::iterator ( ) const
inlinevirtual

◆ size()

template<typename K , typename V , typename HASHCODE = HashCode<K>>
virtual int decaf::util::HashMap< K, V, HASHCODE >::HashMapValueCollection::size ( ) const
inlinevirtual

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

Implements decaf::util::Collection< E >.

References decaf::util::HashMap< K, V, HASHCODE >::size().


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