I\'m trying to write a generic max function that takes two Comparables.
Comparable
So far I have
public static &g
It's offten better getting already implemented iso create owns. See at Min / Max function with two Comparable. Simplest is org.apache.commons.lang.ObjectUtils:
org.apache.commons.lang.ObjectUtils
Comparable a = ...; Comparable b = ...; Comparable min = ObjectUtils.min(a, b);