public final class IdentifierUtils extends Object
Modifier and Type | Field and Description |
---|---|
static com.google.common.base.Function<String,String> |
TO_LOWER_CASE
Function of
toLowerCase(String) method. |
Modifier and Type | Method and Description |
---|---|
static int |
compareToInLowerCase(String identifier1,
String identifier2)
Converts the two given identifier strings to lowercase and compare them.
|
static Predicate<String> |
containsIdentifierPredicate(Collection<String> identifiers) |
static boolean |
equalsInLowerCase(String identifier1,
String identifier2)
Converts the two given identifier strings to lowercase and check for equality.
|
static boolean |
hasLeadingOrTrailingWhitespace(String s) |
static void |
prepareIdentifierCompareLocale() |
static Set<String> |
toLowerCase(Collection<? extends String> identifiers)
Converts the given set identifier string to lowercase.
|
static String |
toLowerCase(String identifier)
Converts the given identifier string to lowercase.
|
public static final com.google.common.base.Function<String,String> TO_LOWER_CASE
toLowerCase(String)
method.public static void prepareIdentifierCompareLocale()
public static String toLowerCase(String identifier)
identifier
- the identifier string, null allowed.public static Set<String> toLowerCase(Collection<? extends String> identifiers)
identifiers
- the identifier strings, nulls allowed.public static Predicate<String> containsIdentifierPredicate(Collection<String> identifiers)
identifiers
- the identifier strings, nulls allowed.Predicate
returning whether given identifier is in identifiers
, ignoring casepublic static int compareToInLowerCase(String identifier1, String identifier2)
identifier1
- identifier. Must not be nullidentifier2
- identifier. Must not be nullComparator.compare(Object, Object)
}public static boolean equalsInLowerCase(String identifier1, String identifier2)
identifier1
- identifier. Can be nullidentifier2
- identifier. Can be nullpublic static boolean hasLeadingOrTrailingWhitespace(String s)
s
- a non-null
identifiertrue
if this identifier starts or ends with white spaceCopyright © 2021 Atlassian. All rights reserved.