Oracle® Fusion Middleware C++ API Reference for Oracle Coherence
12c (


TypedCollections::TypedMap::EntryConverter Class Reference

#include <coherence/util/TypedCollections.hpp>

Inherits Object, and Converter.

List of all members.

Detailed Description

template<class K, class V>
class coherence::util::TypedCollections::TypedMap< K, V >::EntryConverter

A converter from untyped to typed entries: Map::Entry -> TypedEntry.

Public Types

typedef spec::Handle Handle
 EntryConverter Handle definition.
typedef spec::View View
 EntryConverter View definition.
typedef spec::Holder Holder
 EntryConverter Holder definition.

Public Member Functions

virtual Object::Holder convert (Object::Holder oh) const
 Convert an Object referenced by the supplied holder.

oh the holder to the Object to convert
the holder to the converted Object

virtual bool isImmutable () const
 Return true iff no further changes can be made to the Object, that would effect the outcome of a call to its equals method.

Except for Objects which are naturally immutable (such as String), being immutable generally implies that the Object is only referenced via const pointers or views. Objects which hold references to child Objects, may need to take the immutability of their children into account when determining their own immutability.

This extended check is not performed by the default implementation, but can be integrated into the immutability checks by overriding this method, as well as making use of MemberHandles to reference child Objects.

A typical derived implementation may look as follows:

 bool isImmutable() const
     if (m_fImmutable) // check recorded state
         return true; // already marked as immutable, avoid calculation
     else if (Object::isImmutable()) // ensure shallow immutability
         // ensure deep immutability
         if (m_child1->isImmutable() && m_child2->isImmutable() ...
                                     && m_childN->isImmutable())
             // record and return immutability
             return m_fImmutable = true;
         // some Objects which comprise this Object are still mutable
     return false;

The default implementation return true iff the Object is only referenced via const pointers and or views.

true iff the Object is immutable

Protected Member Functions

 EntryConverter ()
 Create new EntryConverter instance.
 EntryConverter (const EntryConverter &)
 Copy constructor.

The documentation for this class was generated from the following file:
Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.