public class ObjectUtil extends Object
| Constructor and Description |
|---|
ObjectUtil() |
| Modifier and Type | Method and Description |
|---|---|
static int |
compareAsTexts(@Nullable Object o1,
@Nullable Object o2)
Compares the "toString" representations of o1 and o2.
|
public static int compareAsTexts(@Nullable Object o1, @Nullable Object o2)
Comparison is done as in String.compareToIgnoreCase(String), but
if the strings are equal when ignoring the case they are compared again
case sensitively to ensure a stable order between the two strings.
null values are assumed to be larger than any String.
This method does not take locale into account, and may result in an unsatisfactory ordering for certain locales.
Copyright © 2023 abego Software GmbH, Germany. All rights reserved.