1 package com.calipso.reportgenerator.reportcalculator; 2 3 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 } 27 | Popular Tags |