Oracle Coherence for C++ API
Release 3.7.1.0
E22845-01
#include <coherence/util/comparator/EntryComparator.hpp>
Inherits SafeComparator.
Comparator implementation used to compare map entries.
Depending on the comparison style this comparator will compare entries' values, entries' keys or, when the provided comparator is an instance of QueryMapComparator, the entries themselves.
Public Types |
|
| typedef spec::Handle | Handle |
| EntryComparator Handle definition. | |
| typedef spec::View | View |
| EntryComparator View definition. | |
| typedef spec::Holder | Holder |
| EntryComparator Holder definition. | |
Public Member Functions |
|
| virtual int32_t | compare (Object::View vO1, Object::View vO2) const |
| Compares two arguments for order. | |
| virtual void | readExternal (PofReader::Handle hIn) |
| virtual void | writeExternal (PofWriter::Handle hOut) const |
| virtual bool | equals (Object::View v) const |
| int32_t | getComparisonStyle () |
| Obtain the comparison style value utilized by this EntryComparator. | |
| bool | isCompareValue () |
| Check whether or not this EntryComparator uses entries' values to pass for comparison to the underlying Comparator. | |
| bool | isCompareKey () |
| Check whether or not this EntryComparator uses entries' keys to pass for comparison to the underlying Comparator. | |
| bool | isCompareEntry () |
| Check whether or not this EntryComparator pass entries themselves for comparison to the underlying QueryMapComparator::compareEntries method. | |
Static Public Attributes |
|
| static const int32_t | cmp_auto |
| Indicates that this EntryComparator should choose the comparison style based on the underying comparator type. | |
| static const int32_t | cmp_value |
| Indicates that this EntryComparator should compare the entries' values. | |
| static const int32_t | cmp_key |
| Indicates that this EntryComparator should compare the entries' keys. | |
| static const int32_t | cmp_entry |
| Indicates that entries that implement com.tangosol.util.QueryMap.Entry interface will be compared using the QueryMapComparator::compareEntries method. | |
Protected Member Functions |
|
| EntryComparator () | |
| Default constructor (necessary for the PortableObject interface). | |
| EntryComparator (Comparator::View vComparator, int32_t nStyle=cmp_auto) | |
| Construct a SafeComparator delegating to the specified (wrapped) comparator. | |
Protected Attributes |
|
| int32_t | m_nStyle |
| Comparison style utilized by this EntryComparator. | |
| EntryComparator | ( | Comparator::View | vComparator, | |
| int32_t | nStyle = cmp_auto |
|||
| ) | [protected] |
Construct a SafeComparator delegating to the specified (wrapped) comparator.
| vComparator | Comparator object to delegate comparison of non-null values (optional) |
| virtual int32_t compare | ( | Object::View | vO1, | |
| Object::View | vO2 | |||
| ) | const [virtual] |
Compares two arguments for order.
The arguments must be coherence::util::Map::Entry objects. Depending on the comparison style, this method will pass either the entries' values, keys or the entries themselves to the underlying Comparator.
| vO1 | the first object to be compared | |
| vO2 | the second object to be compared |
| ClassCastException | if the arguments' types prevent them from being compared by this Comparator. |
Reimplemented from SafeComparator.
| int32_t getComparisonStyle | ( | ) |
Obtain the comparison style value utilized by this EntryComparator.
The returned value should be one of the CMP_* constants.
| bool isCompareValue | ( | ) |
Check whether or not this EntryComparator uses entries' values to pass for comparison to the underlying Comparator.
| bool isCompareKey | ( | ) |
Check whether or not this EntryComparator uses entries' keys to pass for comparison to the underlying Comparator.
| bool isCompareEntry | ( | ) |
Check whether or not this EntryComparator pass entries themselves for comparison to the underlying QueryMapComparator::compareEntries method.
int32_t m_nStyle [protected] |
Comparison style utilized by this EntryComparator.
Valid values are any of the CMP_* constants.
The documentation for this class was generated from the following file: