KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > calipso > reportgenerator > reportcalculator > GreaterAverageOperation


1 package com.calipso.reportgenerator.reportcalculator;
2
3 /**
4  *
5  * User: jbassino
6  * Date: 12-may-2005
7  * Time: 16:28:11
8  * Calipso Software
9  */

10 public class GreaterAverageOperation extends FilterOperation {
11   private float baseValue;
12   private float total;
13
14   public GreaterAverageOperation(float value, float total) {
15     super();
16     this.baseValue = value;
17     this.total = total;
18   }
19
20   protected boolean accept(SharedFloat value) {
21     return ((value.floatValue() / total) * 100) > baseValue;
22   }
23
24 }
25
Popular Tags