dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #37146
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19000: Functions, moves name var
------------------------------------------------------------
revno: 19000
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-04-23 19:11:18 +0200
message:
Functions, moves name var
modified:
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/math/OneIfZeroOrPositiveFunction.java
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/math/ZeroIfNegativeFunction.java
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/MathUtils.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/math/OneIfZeroOrPositiveFunction.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/math/OneIfZeroOrPositiveFunction.java 2015-04-22 15:07:43 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/math/OneIfZeroOrPositiveFunction.java 2015-04-23 17:11:18 +0000
@@ -37,6 +37,8 @@
public class OneIfZeroOrPositiveFunction
extends UnaryDoubleFunction
{
+ public static final String NAME = "oizp";
+
public OneIfZeroOrPositiveFunction()
{
super();
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/math/ZeroIfNegativeFunction.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/math/ZeroIfNegativeFunction.java 2015-04-22 15:07:43 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/math/ZeroIfNegativeFunction.java 2015-04-23 17:11:18 +0000
@@ -37,6 +37,8 @@
public class ZeroIfNegativeFunction
extends UnaryDoubleFunction
{
+ public static final String NAME = "zing";
+
public ZeroIfNegativeFunction()
{
super();
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/MathUtils.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/MathUtils.java 2015-04-22 15:07:43 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/MathUtils.java 2015-04-23 17:11:18 +0000
@@ -51,9 +51,6 @@
{
public static final Double ZERO = new Double( 0 );
- public static final String ONEIFZEROORPOSITIVE_FUNCTION_NAME = "oizp";
- public static final String ZEROIFNEGATIVE_FUNCTION_NAME = "zing";
-
private static DoubleValidator DOUBLE_VALIDATOR = new DoubleValidator();
private static IntegerValidator INT_VALIDATOR = new IntegerValidator();
@@ -151,8 +148,8 @@
final JEP parser = new JEP();
parser.addStandardFunctions();
parser.addStandardConstants();
- parser.addFunction( ONEIFZEROORPOSITIVE_FUNCTION_NAME, new OneIfZeroOrPositiveFunction() );
- parser.addFunction( ZEROIFNEGATIVE_FUNCTION_NAME, new ZeroIfNegativeFunction() );
+ parser.addFunction( OneIfZeroOrPositiveFunction.NAME, new OneIfZeroOrPositiveFunction() );
+ parser.addFunction( ZeroIfNegativeFunction.NAME, new ZeroIfNegativeFunction() );
return parser;
}