hudson.plugins.violations.util
Class Compares
java.lang.Object
hudson.plugins.violations.util.Compares
public class Compares
- extends Object
A utility class to help compare objects.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Compares
public Compares()
compare
public static int compare(Comparable a,
Comparable b)
- Compare two (nullable) objects.
- Parameters:
a - the first objectb - the second object
- Returns:
- 0 if the objects are the same,
-1 if first is less than second or is null,
1 if second is less that first or is null.
compare
public static int compare(Comparable... objects)
- Compare a list of pair of objects.
- Returns:
- 0 if all pairs are the same, else the result of the first
pair that is not the same.
Copyright © 2004-2012 Hudson. All Rights Reserved.