From b9e3bc72d55b6eb73a5cc44f5cc2561d9997ef0d Mon Sep 17 00:00:00 2001 From: Sebastian Bazley Date: Fri, 20 Mar 2009 17:10:39 +0000 Subject: [PATCH] LANG-495 - add generics for max and min git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@756634 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/commons/lang/ObjectUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/java/org/apache/commons/lang/ObjectUtils.java b/src/java/org/apache/commons/lang/ObjectUtils.java index cac0f8fe3..52de115b9 100644 --- a/src/java/org/apache/commons/lang/ObjectUtils.java +++ b/src/java/org/apache/commons/lang/ObjectUtils.java @@ -248,7 +248,7 @@ public class ObjectUtils { *
  • If both the comparables are null, null is returned. * */ - public static Object min(Comparable c1, Comparable c2) { + public static > T min(T c1, T c2) { if (c1 != null && c2 != null) { return c1.compareTo(c2) < 1 ? c1 : c2; } else { @@ -269,7 +269,7 @@ public class ObjectUtils { *
  • If both the comparables are null, null is returned. * */ - public static Object max(Comparable c1, Comparable c2) { + public static > T max(T c1, T c2) { if (c1 != null && c2 != null) { return c1.compareTo(c2) >= 0 ? c1 : c2; } else {