commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject svn commit: r1174032 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java
Date Thu, 22 Sep 2011 09:55:02 GMT
Author: erans
Date: Thu Sep 22 09:55:02 2011
New Revision: 1174032

URL: http://svn.apache.org/viewvc?rev=1174032&view=rev
Log:
Added "final".

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java?rev=1174032&r1=1174031&r2=1174032&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java Thu
Sep 22 09:55:02 2011
@@ -1957,10 +1957,11 @@ public final class MathUtils {
      * @param strict Whether the order should be strict.
      * @return {@code true} if sorted, {@code false} otherwise
      */
-    public static boolean isMonotone(Comparable[] val, OrderDirection dir,
-            boolean strict){
+    public static boolean isMonotone(Comparable[] val,
+                                     OrderDirection dir,
+                                     boolean strict){
         Comparable previous = val[0];
-        int max = val.length;
+        final int max = val.length;
         int comp;
         for (int i = 1; i < max; i++) {
             switch (dir) {
@@ -2006,10 +2007,11 @@ public final class MathUtils {
      * @param strict Whether the order should be strict.
      * @return {@code true} if sorted, {@code false} otherwise
      */
-    public static boolean isMonotone(double[] val, OrderDirection dir,
+    public static boolean isMonotone(double[] val,
+                                     OrderDirection dir,
                                      boolean strict){
         double previous = val[0];
-        int max = val.length;
+        final int max = val.length;
         for (int i = 1; i < max; i++) {
             switch (dir) {
             case INCREASING:
@@ -2058,7 +2060,7 @@ public final class MathUtils {
     public static boolean checkOrder(double[] val, OrderDirection dir,
                                      boolean strict, boolean abort) {
         double previous = val[0];
-        int max = val.length;
+        final int max = val.length;
         for (int i = 1; i < max; i++) {
             switch (dir) {
             case INCREASING:



Mime
View raw message