org.zkoss.lang
Class Comparables

java.lang.Object
  extended by org.zkoss.lang.Comparables

public final class Comparables
extends java.lang.Object

Utilities regarding Comparable type objects.

Author:
henrichen

Constructor Summary
Comparables()
           
 
Method Summary
static java.lang.Comparable max(java.lang.Comparable a, java.lang.Comparable b)
          Given two comparables, return the maximum of the two.
static java.lang.Comparable min(java.lang.Comparable a, java.lang.Comparable b)
          Given two comparables, return the minimum of the two.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Comparables

public Comparables()
Method Detail

min

public static final java.lang.Comparable min(java.lang.Comparable a,
                                             java.lang.Comparable b)
Given two comparables, return the minimum of the two. Note that the two Comparable must be with compatible type, or a ClassCastException might be thrown.


max

public static final java.lang.Comparable max(java.lang.Comparable a,
                                             java.lang.Comparable b)
Given two comparables, return the maximum of the two. Note that the two Comparable must be with compatible type, or a ClassCastException might be thrown.



Copyright © 2005-2011 Potix Corporation. All Rights Reserved. SourceForge.net Logo