com.im.df/1 5.8

com.im.df.util
Class ChemicalTermsExpressionUtils

java.lang.Object
  extended by com.im.df.util.ChemicalTermsExpressionUtils

public class ChemicalTermsExpressionUtils
extends Object

Validates chemical terms expressions.


Constructor Summary
ChemicalTermsExpressionUtils()
          Creates a new instance of ChemicalTermsExpressionUtils
 
Method Summary
static boolean containsExpressionValue(String expr, Map<String,String> map)
           
static JTextPane createCTTextPane()
           
 String validateExpression(String expr, Class<?> returnType, boolean allowEmpty)
          Validate the chemical terms expression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChemicalTermsExpressionUtils

public ChemicalTermsExpressionUtils()
Creates a new instance of ChemicalTermsExpressionUtils

Method Detail

validateExpression

public String validateExpression(String expr,
                                 Class<?> returnType,
                                 boolean allowEmpty)
Validate the chemical terms expression. Tries to evaluate the expression twice for methane. If the expression has a bad syntax or evaluating the expression generates an exception resulting from use of an unlicensed plugin then an error message is returned.

Parameters:
expr -
Returns:
Null for a valid expression or an error message that explains why the expression is invalid.

createCTTextPane

public static JTextPane createCTTextPane()

containsExpressionValue

public static boolean containsExpressionValue(String expr,
                                              Map<String,String> map)

com.im.df/1 5.8