17#ifndef _DECAF_UTIL_COMPARATORS_EQUALS_H_
18#define _DECAF_UTIL_COMPARATORS_EQUALS_H_
33 template<
typename E >
40 virtual bool operator()(
const E& left,
const E& right)
const {
44 virtual int compare(
const E& o1,
const E& o2)
const {
59 template<
typename E >
68 return left->equals(*right);
69 }
else if (left ==
NULL && right ==
NULL) {
78 return o1->compareTo(*o2);
83 }
else if (o1.
get() < o2.
get()) {
Decaf's implementation of a Smart Pointer that is a template on a Type and is Thread Safe if the defa...
Definition Pointer.h:53
PointerType get() const
Gets the real pointer that is contained within this Pointer.
Definition Pointer.h:188
A comparison function, which imposes a total ordering on some collection of objects.
Definition Comparator.h:40
virtual int compare(const decaf::lang::Pointer< E > &o1, const decaf::lang::Pointer< E > &o2) const
Compares its two arguments for order.
Definition Equals.h:76
virtual bool operator()(const decaf::lang::Pointer< E > &left, const decaf::lang::Pointer< E > &right) const
Implementation of the Binary function interface as a means of allowing a Comparator to be passed to a...
Definition Equals.h:66
virtual ~Equals()
Definition Equals.h:64
Equals()
Definition Equals.h:63
virtual int compare(const E &o1, const E &o2) const
Compares its two arguments for order.
Definition Equals.h:44
Equals()
Definition Equals.h:37
virtual ~Equals()
Definition Equals.h:38
virtual bool operator()(const E &left, const E &right) const
Implementation of the Binary function interface as a means of allowing a Comparator to be passed to a...
Definition Equals.h:40
#define NULL
Definition Config.h:33
Definition AbstractCollection.h:33
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition AprPool.h:25