#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< char16_t > [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], Size32 [virtual], Size64 [virtual], String [virtual], ArrayFilter::WeightedFilter [virtual], SortedBag::UniqueElement [virtual], and UUID [virtual].
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.
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. | |
| 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)).
| v | the Object to be compared |
| 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, String, Primitive< int64_t >, Primitive< int16_t >, Primitive< float64_t >, Primitive< char16_t >, Primitive< float32_t >, Primitive< size64_t >, Primitive< int32_t >, Primitive< size32_t >, Primitive< octet_t >, and Primitive< bool >.
| virtual bool operator< | ( | Object::View | v | ) | const [inline, virtual] |
Standard C++ less-than operator delegate.
| v | the Object to be compared |