activemq-cpp-3.9.5
decaf::lang::ArrayPointerComparator< T > Class Template Reference

This implementation of Comparator is designed to allows objects in a Collection to be sorted or tested for equality based on the value of the value of the actual pointer to the array being contained in this ArrayPointer. More...

#include <src/main/decaf/lang/ArrayPointer.h>

Inheritance diagram for decaf::lang::ArrayPointerComparator< T >:

Public Member Functions

virtual ~ArrayPointerComparator ()
 
virtual bool operator() (const ArrayPointer< T > &left, const ArrayPointer< T > &right) const
 
virtual int compare (const ArrayPointer< T > &left, const ArrayPointer< T > &right) const
 
- Public Member Functions inherited from decaf::util::Comparator< ArrayPointer< T > >
virtual ~Comparator ()
 
virtual bool operator() (const T &left, const T &right) const=0
 Implementation of the Binary function interface as a means of allowing a Comparator to be passed to an STL Map for use as the sorting criteria.
 
virtual int compare (const T &o1, const T &o2) const=0
 Compares its two arguments for order.
 

Detailed Description

template<typename T>
class decaf::lang::ArrayPointerComparator< T >

This implementation of Comparator is designed to allows objects in a Collection to be sorted or tested for equality based on the value of the value of the actual pointer to the array being contained in this ArrayPointer.

This allows for a basic ordering to be acheived in Decaf containers.

Custom implementations are possible where an array of some type has a logical natural ordering such as array of integers where the sum of all ints in the array is used.

Constructor & Destructor Documentation

◆ ~ArrayPointerComparator()

template<typename T>
virtual decaf::lang::ArrayPointerComparator< T >::~ArrayPointerComparator ( )
inlinevirtual

Member Function Documentation

◆ compare()

template<typename T>
virtual int decaf::lang::ArrayPointerComparator< T >::compare ( const ArrayPointer< T > & left,
const ArrayPointer< T > & right ) const
inlinevirtual

◆ operator()()

template<typename T>
virtual bool decaf::lang::ArrayPointerComparator< T >::operator() ( const ArrayPointer< T > & left,
const ArrayPointer< T > & right ) const
inlinevirtual

The documentation for this class was generated from the following file: