KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jmock > examples > calculator > expression > Literal


1 /* Copyright (c) 2000-2004 jMock.org
2  */

3 package org.jmock.examples.calculator.expression;
4
5 import org.jmock.examples.calculator.Environment;
6 import org.jmock.examples.calculator.Expression;
7
8
9 public class Literal implements Expression
10 {
11     private double value;
12
13     public Literal( double value ) {
14         this.value = value;
15     }
16
17     public double evaluate( Environment environment ) {
18         return value;
19     }
20 }
21
Popular Tags