changeset 7969:912cf4ec09d1

Datacage function resolver: Declare static functions static.
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 26 Jun 2014 13:00:18 +0200
parents 09c9920e6f24
children ae1629258692
files artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/FunctionResolver.java
diffstat 1 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/FunctionResolver.java	Thu Jun 26 12:54:31 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/FunctionResolver.java	Thu Jun 26 13:00:18 2014 +0200
@@ -255,7 +255,7 @@
     }
 
     /** Implementation of case-ignoring dc:contains. */
-    public Object contains(List args) throws XPathFunctionException {
+    public static Object contains(List args) throws XPathFunctionException {
         Object haystack = args.get(0);
         Object needle   = args.get(1);
 
@@ -299,7 +299,7 @@
     /** Implementation for getting the minimum value of location or distance
      *  dc:fromValue.
      */
-    public Object fromValue(List args) throws XPathFunctionException {
+    public static Object fromValue(List args) throws XPathFunctionException {
         Object mode      = args.get(0);
         Object locations = args.get(1);
         Object from      = args.get(2);
@@ -345,7 +345,7 @@
     /** Implementation for getting the maximum value of location or distance
      *  dc:toValue.
      */
-    public Object toValue(List args) throws XPathFunctionException {
+    public static Object toValue(List args) throws XPathFunctionException {
         Object mode      = args.get(0);
         Object locations = args.get(1);
         Object to        = args.get(2);
@@ -393,7 +393,7 @@
     /** Implementation for doing a string replace
      *  dc:replace .
      */
-    public Object replace(List args) throws XPathFunctionException {
+    public static Object replace(List args) throws XPathFunctionException {
         Object haystack    = args.get(0);
         Object needle      = args.get(1);
         Object replacement = args.get(2);
@@ -410,7 +410,7 @@
     /** Implementation for doing a string replace
      *  dc:replace-all
      */
-    public Object replaceAll(List args) throws XPathFunctionException {
+    public static Object replaceAll(List args) throws XPathFunctionException {
         Object haystack    = args.get(0);
         Object needle      = args.get(1);
         Object replacement = args.get(2);
@@ -424,7 +424,7 @@
         return haystack;
     }
 
-    public Object dateFormat(List args) throws XPathFunctionException {
+    public static Object dateFormat(List args) throws XPathFunctionException {
         Object pattern = args.get(0);
         Object date    = args.get(1);
 
@@ -449,7 +449,7 @@
         return "";
     }
 
-    public Set<String> allStateSuccessors(String artifactName, String stateId) {
+    public static Set<String> allStateSuccessors(String artifactName, String stateId) {
         GlobalContext gc = RiverContextFactory.getGlobalContext();
         if (gc == null) {
             return Collections.<String>emptySet();
@@ -462,7 +462,7 @@
         return Collections.<String>emptySet();
     }
 
-    public Collection<String> findAll(String needle, String haystack) {
+    public static Collection<String> findAll(String needle, String haystack) {
 
         ArrayList<String> result = new ArrayList<String>();
 
@@ -474,7 +474,7 @@
         return result;
     }
 
-    public Number maxNumber(Object list) {
+    public static Number maxNumber(Object list) {
         if (list instanceof Collection) {
             Collection collection = (Collection)list;
             double max = -Double.MAX_VALUE;
@@ -514,7 +514,7 @@
             : Double.valueOf(Double.MAX_VALUE);
     }
 
-    public Number minNumber(Object list) {
+    public static Number minNumber(Object list) {
         if (list instanceof Collection) {
             Collection collection = (Collection)list;
             double min = Double.MAX_VALUE;

http://dive4elements.wald.intevation.org