decaf::util::HashMap< K, V, HASHCODE >::HashMapEntrySet Class Reference

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

Inheritance diagram for decaf::util::HashMap< K, V, HASHCODE >::HashMapEntrySet:
Inheritance graph
[legend]

Public Member Functions

 HashMapEntrySet (HashMap *parent)
virtual ~HashMapEntrySet ()
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 bool remove (const MapEntry< K, V > &entry)
 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:
value The reference to the element to remove from this Collection.
Returns:
true if the collection was changed, false otherwise.
Exceptions:
UnsupportedOperationExceptio if this is an unmodifiable collection.
NullPointerException if the Collection is a container of pointers and does not allow NULL values.
This implementation iterates over the collection looking for the specified element. If it finds the element, it removes the element from the collection using the iterator's remove method.Note that this implementation throws an UnsupportedOperationException if the iterator returned by this collection's iterator method does not implement the remove method and this collection contains the specified object.
virtual bool contains (const MapEntry< K, V > &entry)
virtual Iterator< MapEntry< K,
V > > * 
iterator ()
virtual Iterator< MapEntry< K,
V > > * 
iterator () const

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


Constructor & Destructor Documentation

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

Member Function Documentation

template<typename K, typename V, typename HASHCODE = HashCode<K>>
virtual void decaf::util::HashMap< K, V, HASHCODE >::HashMapEntrySet::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< MapEntry< K, 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 >::HashMapEntrySet::contains ( const MapEntry< K, V > &  entry  )  [inline, virtual]
template<typename K, typename V, typename HASHCODE = HashCode<K>>
virtual Iterator< MapEntry<K, V> >* decaf::util::HashMap< K, V, HASHCODE >::HashMapEntrySet::iterator (  )  const [inline, virtual]
template<typename K, typename V, typename HASHCODE = HashCode<K>>
virtual Iterator< MapEntry<K, V> >* decaf::util::HashMap< K, V, HASHCODE >::HashMapEntrySet::iterator (  )  [inline, virtual]
Returns:
an iterator over a set of elements of type T.

Implements decaf::lang::Iterable< MapEntry< K, V > >.

template<typename K, typename V, typename HASHCODE = HashCode<K>>
virtual bool decaf::util::HashMap< K, V, HASHCODE >::HashMapEntrySet::remove ( const MapEntry< K, V > &  value  )  [inline, 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:
value The reference to the element to remove from this Collection.
Returns:
true if the collection was changed, false otherwise.
Exceptions:
UnsupportedOperationExceptio if this is an unmodifiable collection.
NullPointerException if the Collection is a container of pointers and does not allow NULL values.
This implementation iterates over the collection looking for the specified element. If it finds the element, it removes the element from the collection using the iterator's remove method.Note that this implementation throws an UnsupportedOperationException if the iterator returned by this collection's iterator method does not implement the remove method and this collection contains the specified object.

This implementation iterates over the collection looking for the specified element. If it finds the element, it removes the element from the collection using the iterator's remove method.

Note that this implementation throws an UnsupportedOperationException if the iterator returned by this collection's iterator method does not implement the remove method and this collection contains the specified object.

Reimplemented from decaf::util::AbstractCollection< MapEntry< K, V > >.

References decaf::util::HashMap< K, V, HASHCODE >::getEntry(), decaf::util::MapEntry< K, V >::getValue(), NULL, and decaf::util::HashMap< K, V, HASHCODE >::removeEntry().

template<typename K, typename V, typename HASHCODE = HashCode<K>>
virtual int decaf::util::HashMap< K, V, HASHCODE >::HashMapEntrySet::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< MapEntry< K, V > >.

References decaf::util::HashMap< K, V, HASHCODE >::elementCount.


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