Package org.zkoss.lang
Class Comparables
java.lang.Object
org.zkoss.lang.Comparables
Utilities regarding Comparable type objects.
- Author:
- henrichen
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final Comparablemax(Comparable a, Comparable b) Given two comparables, return the maximum of the two.static final Comparablemin(Comparable a, Comparable b) Given two comparables, return the minimum of the two.
-
Constructor Details
-
Comparables
public Comparables()
-
-
Method Details
-
min
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
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.
-