svn commit: r981611 - /ofbiz/trunk/framework/sql/src/org/ofbiz/sql/NumberValue.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r981611 - /ofbiz/trunk/framework/sql/src/org/ofbiz/sql/NumberValue.java

doogie-3
Author: doogie
Date: Mon Aug  2 17:41:28 2010
New Revision: 981611

URL: http://svn.apache.org/viewvc?rev=981611&view=rev
Log:
FEATURE: Add static valueOf methods.

Modified:
    ofbiz/trunk/framework/sql/src/org/ofbiz/sql/NumberValue.java

Modified: ofbiz/trunk/framework/sql/src/org/ofbiz/sql/NumberValue.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/sql/src/org/ofbiz/sql/NumberValue.java?rev=981611&r1=981610&r2=981611&view=diff
==============================================================================
--- ofbiz/trunk/framework/sql/src/org/ofbiz/sql/NumberValue.java (original)
+++ ofbiz/trunk/framework/sql/src/org/ofbiz/sql/NumberValue.java Mon Aug  2 17:41:28 2010
@@ -21,6 +21,14 @@ package org.ofbiz.sql;
 public final class NumberValue<N extends Number> extends ConstantValue {
     private final N number;
 
+    public static NumberValue<Long> valueOf(long v) {
+        return new NumberValue<Long>(v);
+    }
+
+    public static NumberValue<Double> valueOf(double v) {
+        return new NumberValue<Double>(v);
+    }
+
     public NumberValue(N number) {
         this.number = number;
     }