mirror of
https://github.com/apache/commons-math.git
synced 2025-02-14 14:06:30 +00:00
Fix generics warning
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1330622 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a5e84b3e75
commit
2ba27ad9df
@ -155,10 +155,10 @@ public class MathArrays {
|
||||
* @param strict Whether the order should be strict.
|
||||
* @return {@code true} if sorted, {@code false} otherwise.
|
||||
*/
|
||||
public static boolean isMonotonic(Comparable[] val,
|
||||
public static <T extends Comparable<? super T>> boolean isMonotonic(T[] val,
|
||||
OrderDirection dir,
|
||||
boolean strict) {
|
||||
Comparable previous = val[0];
|
||||
T previous = val[0];
|
||||
final int max = val.length;
|
||||
for (int i = 1; i < max; i++) {
|
||||
final int comp;
|
||||
|
Loading…
x
Reference in New Issue
Block a user