View Javadoc

1   // Constant.java, created Mar 17, 2004 8:30:37 AM by joewhaley
2   // Copyright (C) 2004 John Whaley <jwhaley@alum.mit.edu>
3   // Licensed under the terms of the GNU LGPL; see COPYING for details.
4   package net.sf.bddbddb;
5   
6   /***
7    * A Constant is a special kind of variable that represents a constant value.
8    * 
9    * @author John Whaley
10   * @version $Id: Constant.java 328 2004-10-16 02:45:30Z joewhaley $
11   */
12  public class Constant extends Variable {
13      
14      /***
15       * Value of constant.
16       */
17      protected long value;
18  
19      /***
20       * Create a constant with the given value.
21       * 
22       * @param value  value of constant
23       */
24      public Constant(long value) {
25          super(Long.toString(value));
26          this.value = value;
27      }
28  
29      /***
30       * Returns the value of this constant.
31       * 
32       * @return value
33       */
34      public long getValue() {
35          return value;
36      }
37  }