public class ComparatorExtensions extends Object
| Constructor and Description |
|---|
ComparatorExtensions() |
| Modifier and Type | Method and Description |
|---|---|
static <T extends Comparable<T>> |
compare(T object,
T compareWithObject)
Compares the given objects and returns the int value.
|
static <T extends Comparable<T>> |
compare(T object,
T compareWithObject,
SortOrder sortOrder)
Compares the given objects and returns the int value.
|
static <T> Integer |
nullCheck(T object,
T compareWithObject)
Checks if one of the given objects are null and returns the value for the Comparator or null
if both are not null or if the given objects are not the same Object.
|
public static <T extends Comparable<T>> int compare(T object, T compareWithObject)
T - the generic typeobject - the objectcompareWithObject - the object to compare with.public static <T extends Comparable<T>> int compare(T object, T compareWithObject, SortOrder sortOrder)
T - the generic typeobject - the objectcompareWithObject - the object to compare with.sortOrder - the sort orderpublic static <T> Integer nullCheck(T object, T compareWithObject)
T - the generic typeobject - the objectcompareWithObject - the compare with objectCopyright © 2007–2015 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.