Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.1.0

E22843-01


com.tangosol.util.aggregator
Class ComparableMax

java.lang.Object
  extended by com.tangosol.util.Base
      extended by com.tangosol.util.BitHelper
          extended by com.tangosol.util.ExternalizableHelper
              extended by com.tangosol.util.aggregator.AbstractAggregator
                  extended by com.tangosol.util.aggregator.AbstractComparableAggregator
                      extended by com.tangosol.util.aggregator.ComparableMax

All Implemented Interfaces:
ExternalizableLite, PortableObject, InvocableMap.EntryAggregator, InvocableMap.ParallelAwareAggregator, java.io.Serializable

public class ComparableMax
extends AbstractComparableAggregator

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 or Date; a Comparator can also be supplied to perform the comparisons.

Since:
Coherence 3.2
Author:
gg 2006.02.13

Field Summary

 

Fields inherited from class com.tangosol.util.aggregator.AbstractComparableAggregator
m_comparator, m_count, m_oResult

 

Fields inherited from class com.tangosol.util.aggregator.AbstractAggregator
m_fParallel

 

Constructor Summary
ComparableMax()
          Default constructor (necessary for the ExternalizableLite interface).
ComparableMax(java.lang.String sMethod)
          Construct a ComparableMax aggregator.
ComparableMax(ValueExtractor extractor)
          Construct a ComparableMax aggregator.
ComparableMax(ValueExtractor extractor, java.util.Comparator comparator)
          Construct a ComparableMax aggregator.

 

Method Summary
protected  void process(java.lang.Object o, boolean fFinal)
          Incorporate one aggregatable value into the result.

 

Methods inherited from class com.tangosol.util.aggregator.AbstractComparableAggregator
finalizeResult, init, readExternal, readExternal, writeExternal, writeExternal

 

Methods inherited from class com.tangosol.util.aggregator.AbstractAggregator
aggregate, aggregateResults, equals, getParallelAggregator, getValueExtractor, hashCode, processEntry, toString

 

Methods inherited from class com.tangosol.util.BitHelper
countBits, countBits, countBits, indexOfLSB, indexOfLSB, indexOfLSB, indexOfMSB, indexOfMSB, indexOfMSB, rotateLeft, rotateLeft, rotateLeft, rotateRight, rotateRight, rotateRight, toBitString, toBitString, toBitString

 

Constructor Detail

ComparableMax

public ComparableMax()
Default constructor (necessary for the ExternalizableLite interface).

ComparableMax

public ComparableMax(ValueExtractor extractor)
Construct a ComparableMax aggregator.
Parameters:
extractor - the extractor that provides a value in the form of any object that implements Comparable interface

ComparableMax

public ComparableMax(ValueExtractor extractor,
                     java.util.Comparator comparator)
Construct a ComparableMax aggregator.
Parameters:
extractor - the extractor that provides an object to be compared
comparator - the comparator used to compare the extracted object

ComparableMax

public ComparableMax(java.lang.String sMethod)
Construct a ComparableMax aggregator.
Parameters:
sMethod - the name of the method that returns a value in the form of any object that implements Comparable interface

Method Detail

process

protected void process(java.lang.Object o,
                       boolean 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 InvocableMap.Entry.

Specified by:
process in class AbstractAggregator
Parameters:
o - 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

Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.1.0

E22843-01


Copyright © 2000, 2011, Oracle and/or its affiliates. All rights reserved.