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

E80355-01

Comparable Class Reference

#include <coherence/lang/Comparable.hpp>

Inherits Object.

Inherited by Character16 [virtual], ClassBasedHeapAnalyzer::ClassStats [virtual], Float32 [virtual], Float64 [virtual], Integer16 [virtual], Integer32 [virtual], Integer64 [virtual], Octet [virtual], Primitive [virtual], Primitive< bool > [virtual], Primitive< float32_t > [virtual], Primitive< float64_t > [virtual], Primitive< int16_t > [virtual], Primitive< int32_t > [virtual], Primitive< int64_t > [virtual], Primitive< octet_t > [virtual], Primitive< size32_t > [virtual], Primitive< size64_t > [virtual], Primitive< wchar16_t > [virtual], Size32 [virtual], Size64 [virtual], String [virtual], ArrayFilter::WeightedFilter [virtual], SortedBag::UniqueElement [virtual], and UUID [virtual].

List of all members.


Detailed Description

This interface imposes a total ordering on the objects of each class that implements it.

This ordering is referred to as the class's natural ordering, and the class's compareTo method is referred to as its natural comparison method.

Author:
jh 2008.02.27

Public Types

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

Public Member Functions

virtual int32_t compareTo (Object::View v) const =0
 Compare this object with the specified object for order.
virtual bool operator< (Object::View v) const
 Standard C++ less-than operator delegate.

Member Function Documentation

virtual int32_t compareTo ( Object::View  v  )  const [pure virtual]

Compare this object with the specified object for order.

Return a negative integer, zero, or a positive integer if this object is less than, equal to, or greater than the specified object.

It is strongly recommended, but not strictly required, that (x->compareTo(y) == 0) == (x->equals(y)).

Parameters:
v the Object to be compared
Returns:
a negative integer, zero, or a positive integer if this object is less than, equal to, or greater than the specified object
Exceptions:
ClassCastException if the specified Object's type prevents it from being compared to this Object

Implemented in Character16, ClassBasedHeapAnalyzer::ClassStats, Float32, Float64, Integer16, Octet, Primitive, Size32, Size64, Primitive< int64_t >, Primitive< int16_t >, Primitive< float64_t >, Primitive< float32_t >, Primitive< size64_t >, Primitive< int32_t >, Primitive< size32_t >, Primitive< octet_t >, Primitive< bool >, and Primitive< wchar16_t >.

virtual bool operator< ( Object::View  v  )  const [inline, virtual]

Standard C++ less-than operator delegate.

Parameters:
v the Object to be compared
Returns:
true if this object is less than the specified object


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