Oracle Coherence for C++ API


InverseComparator Class Reference

#include <coherence/util/comparator/InverseComparator.hpp>

Inherits SafeComparator, and QueryMapComparator.

List of all members.

Detailed Description

Comparator that reverses the result of another comparator.
gm 2008.08.05

Public Types

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

Public Member Functions

virtual int32_t  compare (Object::View vO1, Object::View vO2) const
  Use the wrapped Comparator to compare the two arguments for order and negate the result.
virtual int32_t  compareEntries (QueryMap::Entry::View vEntry1, QueryMap::Entry::View vEntry2) const
  Compare two entries using the underlying comparator and negate the result.
virtual bool  equals (Object::View v) const

Static Public Member Functions

getInstance ()
  An instance of the InverseComparator.

Protected Member Functions

  InverseComparator ()
  Default constructor (necessary for the PortableObject interface).
  InverseComparator (Comparator::View vComparator)
  Construct a InverseComparator.

Constructor & Destructor Documentation

InverseComparator ( Comparator::View  vComparator  )  [protected]

Construct a InverseComparator.

vComparator  the comparator whose results are inverted by this Comparator

Member Function Documentation

virtual int32_t compare ( Object::View  vO1,
Object::View  vO2  
) const [virtual]

Use the wrapped Comparator to compare the two arguments for order and negate the result.

vO1  the first object to be compared
vO2  the second object to be compared
a positive integer, zero, or a negative integer as the first argument is less than, equal to, or greater than the second
ClassCastException  if the arguments' types prevent them from being compared by this Comparator.

Reimplemented from SafeComparator.

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