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

E80355-01

ComparableMax Class Reference

#include <coherence/util/aggregator/ComparableMax.hpp>

Inherits AbstractComparableAggregator.

List of all members.


Detailed Description

Calculates a maximum among values extracted from a set of entries in a Map.

This aggregator is most commonly used with objects that implement Comparable such as String; a Comparator can also be supplied to perform the comparisons.

Author:
djl/pp 2008.05.12

Public Types

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

Protected Member Functions

 ComparableMax ()
 Default constructor (necessary for the PortableObject interface).
 ComparableMax (ValueExtractor::View vExtractor, Comparator::View vComparator=NULL)
 Construct a ComparableMax aggregator.
 ComparableMax (String::View vsMethod, Comparator::View vComparator=NULL)
 Construct a ComparableMax that will aggregate values extracted from a set of InvocableMap::Entry objects.
virtual void process (Object::View v, bool fFinal)
 Incorporate one aggregatable value into the result.

If the fFinal parameter is true, the given object is a partial result (returned by an individual parallel aggregator) that should be incorporated into the final result; otherwise, the object is a value extracted from an coherence::util::InvocableMap::Entry.

This implementation throws an UnsupportedOperationException.

Parameters:
vO the value to incorporate into the aggregated result
fFinal true to indicate that the given object is a partial result returned by a parallel aggregator


Constructor & Destructor Documentation

ComparableMax ( ValueExtractor::View  vExtractor,
Comparator::View  vComparator = NULL 
) [protected]

Construct a ComparableMax aggregator.

Parameters:
vExtractor the extractor that provides an object to be compared
vComparator the comparator used to compare the extracted object, if NULL then the extracted object must implement Comparable

ComparableMax ( String::View  vsMethod,
Comparator::View  vComparator = NULL 
) [protected]

Construct a ComparableMax that will aggregate values extracted from a set of InvocableMap::Entry objects.

Parameters:
vsMethod the name of the method that could be invoked via reflection and that returns values to aggregate; this parameter can also be a dot-delimited sequence of method names which would result in an aggregator based on the ChainedExtractor that is based on an array of corresponding ReflectionExtractor objects
vComparator the comparator used to compare the extracted object, if NULL then the extracted object must implement Comparable
Since:
Coherence 12.1.2


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