com.bc.jexp.impl
Class SymbolFactory

java.lang.Object
  extended by com.bc.jexp.impl.SymbolFactory

public final class SymbolFactory
extends Object

A utility class, which can be used to create constants or variables of a primitive boolean or numeric type.

Version:
$Revision$ $Date$
Author:
Norman Fomferra (norman.fomferra@brockmann-consult.de)

Method Summary
static Symbol createConstant(String name, boolean value)
          Creates a new boolean constant.
static Symbol createConstant(String name, double value)
          Creates a new double constant.
static Symbol createConstant(String name, int value)
          Creates a new int constant.
static Variable createVariable(String name, boolean value)
          Creates a new boolean variable.
static Variable createVariable(String name, double value)
          Creates a new double variable.
static Variable createVariable(String name, int value)
          Creates a new int variable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createConstant

public static Symbol createConstant(String name,
                                    boolean value)
Creates a new boolean constant.

Parameters:
name - the constant's name
value - the constant's final value
Returns:
a symbol representing the constant, never null

createConstant

public static Symbol createConstant(String name,
                                    int value)
Creates a new int constant.

Parameters:
name - the constant's name
value - the constant's final value
Returns:
a symbol representing the constant, never null

createConstant

public static Symbol createConstant(String name,
                                    double value)
Creates a new double constant.

Parameters:
name - the constant's name
value - the constant's final value
Returns:
a symbol representing the constant, never null

createVariable

public static Variable createVariable(String name,
                                      boolean value)
Creates a new boolean variable.

Parameters:
name - the variable's name
value - the variable's initial value
Returns:
the variable, never null

createVariable

public static Variable createVariable(String name,
                                      int value)
Creates a new int variable.

Parameters:
name - the variable's name
value - the variable's initial value
Returns:
the variable, never null

createVariable

public static Variable createVariable(String name,
                                      double value)
Creates a new double variable.

Parameters:
name - the variable's name
value - the variable's initial value
Returns:
the variable, never null


Copyright © 2002-2012 Brockmann Consult GmbH. All Rights Reserved.