public enum CaseMapping extends Enum<CaseMapping>
Enum Constant and Description |
---|
ASCII
A-Z become a-z
|
RFC1459
A-Z become a-z, []^ become {}~
|
STRICT_RFC1459
A-Z become a-z, [] become {}
|
Modifier and Type | Method and Description |
---|---|
boolean |
areEqualIgnoringCase(@NonNull String one,
@NonNull String two)
Gets if two given strings are equal, case insensitive, using this
case mapping.
|
static @NonNull Optional<CaseMapping> |
getByName(@Nullable String name)
Gets a CaseMapping by name.
|
@NonNull String |
toLowerCase(@NonNull String input)
Converts a given String to lowercase per spec.
|
static CaseMapping |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CaseMapping[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CaseMapping ASCII
public static final CaseMapping RFC1459
public static final CaseMapping STRICT_RFC1459
public static CaseMapping[] values()
for (CaseMapping c : CaseMapping.values()) System.out.println(c);
public static CaseMapping valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static @NonNull Optional<CaseMapping> getByName(@Nullable String name)
name
- the name of the CaseMapping to getpublic boolean areEqualIgnoringCase(@NonNull String one, @NonNull String two)
one
- one stringtwo
- two string, red string, blue stringpublic @NonNull String toLowerCase(@NonNull String input)
input
- string to be lowercasedIllegalArgumentException
- if input is nullCopyright © 2013–2021 Kitteh. All rights reserved.