Adempiere 3.5.2a

org.compiere.util
Class Evaluator

java.lang.Object
  extended by org.compiere.util.Evaluator

public class Evaluator
extends Object

Expression Evaluator

Version:
$Id: Evaluator.java,v 1.3 2006/07/30 00:54:36 jjanke Exp $
Author:
Jorg Janke

Constructor Summary
Evaluator()
           
 
Method Summary
static boolean evaluateLogic(Evaluatee source, String logic)
          Evaluate Logic.
static boolean isAllVariablesDefined(Evaluatee source, String logic)
          Check if All Variables are Defined
static void parseDepends(ArrayList<String> list, String parseString)
          Parse String and add variables with @ to the list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Evaluator

public Evaluator()
Method Detail

isAllVariablesDefined

public static boolean isAllVariablesDefined(Evaluatee source,
                                            String logic)
Check if All Variables are Defined

Parameters:
source - source
logic - logic info
Returns:
true if fully defined

evaluateLogic

public static boolean evaluateLogic(Evaluatee source,
                                    String logic)
Evaluate Logic. format := [ ] expression := @@ logic := <|> | <&> exLogic := <=> | | <^> | <<> | <>> context := any global or window context value := strings can be with ' or " logic operators := AND or OR with the prevoius result from left to right Example '@AD_Table@=Test | @Language@=GERGER

Parameters:
source - class implementing get_ValueAsString(variable)
logic - logic string
Returns:
locic result

parseDepends

public static void parseDepends(ArrayList<String> list,
                                String parseString)
Parse String and add variables with @ to the list.

Parameters:
list - list to be added to
parseString - string to parse for variables

Adempiere 3.5.2a

Adempiere® is a registered trademark of ADempiere Business Inc. ©2004-2008 HumanFlash.com All rights reserved.