public class TextUtils
extends java.lang.Object
This class provides small utilities similar to Android's android.text.TextUtils,
such as null/empty checks and CharSequence equality comparison.
| Modifier and Type | Method and Description |
|---|---|
static boolean |
equals(java.lang.CharSequence a,
java.lang.CharSequence b)
Compares two
CharSequence instances for equality. |
static boolean |
isEmpty(java.lang.CharSequence str)
Returns whether the given
CharSequence is null or has length 0. |
public static boolean isEmpty(java.lang.CharSequence str)
CharSequence is null or has length 0.str - the character sequence to test; may be nulltrue if str is null or empty; otherwise falsepublic static boolean equals(java.lang.CharSequence a,
java.lang.CharSequence b)
CharSequence instances for equality.
Rules:
a and b are the same reference, returns true.String, delegates to String.equals(Object).false.a - first value; may be nullb - second value; may be nulltrue if the sequences are equal by the rules above; otherwise false