KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > calipso > reportgenerator > reportcalculator > arithmetic > ConstantArithmeticExp


1 package com.calipso.reportgenerator.reportcalculator.arithmetic;
2
3 import java.util.Map JavaDoc;
4 import java.io.Serializable JavaDoc;
5
6 /**
7  * Representa una constante de la expression.
8  */

9
10 public class ConstantArithmeticExp extends ValueArithmeticExp implements Serializable JavaDoc{
11   private float value;
12
13   /**
14    * Inicializa una instancia de <code>ConstantArithmeticExp</code>
15    * @param value
16    */

17   public ConstantArithmeticExp(float value) {
18     this.value = value;
19   }
20
21   /**
22    * Retorna el valor.
23    * @param context
24    * @return
25    */

26   public float value(Map JavaDoc context) {
27     return value;
28   }
29
30   /**
31    * Metodo toString de la clase
32    * @return
33    */

34   public String JavaDoc toString() {
35     return String.valueOf(value);
36   }
37 }
38
Popular Tags