org.shapelogic.mathematics
Class MaxAccumulator

java.lang.Object
  extended by org.shapelogic.calculation.BaseAccumulator<java.lang.Integer,java.lang.Integer>
      extended by org.shapelogic.mathematics.MaxAccumulator
All Implemented Interfaces:
java.util.Iterator<java.lang.Integer>, Accumulator<java.lang.Integer,java.lang.Integer>, CalcValue<java.lang.Integer>, LazyCalc<java.lang.Integer>

public class MaxAccumulator
extends BaseAccumulator<java.lang.Integer,java.lang.Integer>

AddAccumulator is an accumulator that add integers. Since this is used so much.

Author:
Sami Badawi

Field Summary
 
Fields inherited from class org.shapelogic.calculation.BaseAccumulator
_dirty, _input, _inputElement, _previousInputElement, _previousValue, _value
 
Constructor Summary
MaxAccumulator(java.util.Iterator<java.lang.Integer> input)
           
 
Method Summary
 java.lang.Integer accumulate(java.lang.Integer element, java.lang.Integer out)
          return element + out;
 
Methods inherited from class org.shapelogic.calculation.BaseAccumulator
getInput, getPreviousValue, getValue, hasNext, isDirty, next, remove, setup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MaxAccumulator

public MaxAccumulator(java.util.Iterator<java.lang.Integer> input)
Method Detail

accumulate

public java.lang.Integer accumulate(java.lang.Integer element,
                                    java.lang.Integer out)
Description copied from interface: Accumulator
return element + out;

Specified by:
accumulate in interface Accumulator<java.lang.Integer,java.lang.Integer>
Specified by:
accumulate in class BaseAccumulator<java.lang.Integer,java.lang.Integer>


Copyright © 2008. All Rights Reserved.