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:
Inheritance graph
[legend]

Public Member Functions

 HashMapValueCollection (HashMap *parent)
virtual ~HashMapValueCollection ()
virtual bool contains (const V &value) const
 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:
value The value to check for presence in the collection.
Returns:
true if there is at least one of the elements in the collection
Exceptions:
NullPointerException if the Collection contains pointers and the Collection does not allow for NULL elements (optional check).
This implementation iterates over the elements in the collection, checking each element in turn for equality with the specified element.
virtual int size () const
 Returns the number of elements in this collection.
virtual void clear ()
 Removes all of the elements from this collection (optional operation).
virtual Iterator< V > * iterator ()
virtual Iterator< V > * iterator () const

template<typename K, typename V, typename HASHCODE = HashCode<K>>
class decaf::util::HashMap< K, V, HASHCODE >::HashMapValueCollection


Constructor & Destructor Documentation

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

Member Function Documentation

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

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:
UnsupportedOperationException if the clear operation is not supported by this collection

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

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

template<typename K, typename V, typename HASHCODE = HashCode<K>>
virtual bool decaf::util::HashMap< K, V, HASHCODE >::HashMapValueCollection::contains ( const V &  value  )  const [inline, 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:
value The value to check for presence in the collection.
Returns:
true if there is at least one of the elements in the collection
Exceptions:
NullPointerException if the Collection contains pointers and the Collection does not allow for NULL elements (optional check).
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().

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

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

template<typename K, typename V, typename HASHCODE = HashCode<K>>
virtual int decaf::util::HashMap< K, V, HASHCODE >::HashMapValueCollection::size (  )  const [inline, 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

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

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


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

Generated on 1 Dec 2014 for activemq-cpp-3.8.2 by  doxygen 1.6.1