← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19056: Javadoc

 

------------------------------------------------------------
revno: 19056
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2015-04-29 13:38:15 +0200
message:
  Javadoc
modified:
  dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ExpressionUtils.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ExpressionUtils.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ExpressionUtils.java	2015-04-29 11:33:31 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ExpressionUtils.java	2015-04-29 11:38:15 +0000
@@ -48,6 +48,14 @@
         JEXL.setSilent( false );
     }
     
+    /**
+     * Evaluates the given expression. The given variables will be substituted 
+     * in the expression.
+     * 
+     * @param expression the expression.
+     * @param vars the variables, can be null.
+     * @return the result of the evaluation.
+     */
     public static Object evaluate( String expression, Map<String, Object> vars )
     {
         Expression exp = JEXL.createExpression( expression );
@@ -56,7 +64,15 @@
                 
         return exp.evaluate( context );
     }
-    
+
+    /**
+     * Evaluates the given expression to true or false. The given variables will 
+     * be substituted in the expression.
+     * 
+     * @param expression the expression.
+     * @param vars the variables, can be null.
+     * @return true or false.
+     */
     public static boolean isTrue( String expression, Map<String, Object> vars )
     {
         Boolean result = (Boolean) evaluate( expression, vars );