|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.sfac.utils.Comparison
public class Comparison
| Constructor Summary | |
|---|---|
Comparison()
|
|
| Method Summary | ||
|---|---|---|
static int |
compareStrings(String str1,
String str2)
Compare the two Strings taking care of null values. |
|
static
|
compareTo(List<T> lst1,
List<T> lst2)
Compare the two lists of comparable objects taking care of null values. |
|
static
|
compareTo(T obj1,
T obj2)
Compare the two Comparable objects (using compareTo(..)) taking care of null values. |
|
static
|
compareTo(T obj1,
T obj2)
Compare the two enum objects (using ordinal()) taking care of null values. |
|
static boolean |
equals(Object obj1,
Object obj2)
Compare the two objects (using equals(..)) taking care of null values. |
|
static boolean |
isDefined(List<?> lst)
A list is defined if it is not null and it contains at least one element. |
|
static boolean |
isDefined(String str)
A string is defined if it is not null and don't contains only whitespace characters (space, tabs, returns, ...). |
|
static boolean |
isEmpty(List<?> lst)
A string is empty if it is null or contains only whitespace characters (space, tabs, returns, ...). |
|
static boolean |
isEmpty(String str)
A string is empty if it is null or contains only whitespace characters (space, tabs, returns, ...). |
|
static
|
listEquals(List<T> lst1,
List<T> lst2)
Compare if the two lists of comparable objects are equals (taking care of null values). |
|
static boolean |
startsWithIgnoreCase(String checkedString,
String start)
|
|
static boolean |
stringEquals(Object obj1,
Object obj2)
Comparison of strings where a null string is considered as equivalent to an empty string. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Comparison()
| Method Detail |
|---|
public static boolean equals(Object obj1,
Object obj2)
public static boolean stringEquals(Object obj1,
Object obj2)
public static <T> boolean listEquals(List<T> lst1,
List<T> lst2)
public static <T extends Comparable<T>> int compareTo(T obj1,
T obj2)
public static int compareStrings(String str1,
String str2)
String.compareTo.
public static <T extends Enum<T>> int compareTo(T obj1,
T obj2)
public static <T extends Comparable<T>> int compareTo(List<T> lst1,
List<T> lst2)
public static boolean isEmpty(String str)
public static boolean isEmpty(List<?> lst)
public static boolean isDefined(String str)
isEmpty(x) = !isDefined(x)
public static boolean isDefined(List<?> lst)
isEmpty(lst) = !isDefined(lst)
public static boolean startsWithIgnoreCase(String checkedString,
String start)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||