Added "final".

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1174032 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gilles Sadowski 2011-09-22 09:55:02 +00:00
parent 898709086b
commit 257d7c7c85
1 changed files with 8 additions and 6 deletions

View File

@ -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: