01: package com.calipso.reportgenerator.reportcalculator;
02:
03: /**
04: *
05: * User: jbassino
06: * Date: 12-may-2005
07: * Time: 16:44:20
08: * Calipso Software
09: */
10: public class RangeAverageOperation extends FilterOperation {
11: private float baseValue;
12: private float roofValue;
13: private float total;
14:
15: public RangeAverageOperation(float from, float to, float total) {
16: super ();
17: this .baseValue = from;
18: this .roofValue = to;
19: this .total = total;
20: }
21:
22: protected boolean accept(SharedFloat value) {
23: float averageValue = ((value.floatValue() / total) * 100);
24: return (averageValue > baseValue && averageValue < roofValue);
25: }
26: }
|