public enum CaseMode extends Enum<CaseMode>
UPPER_CASE
, LOWER_CASE
, and MIXED_CASE
) a database may support. Use convertCase(String)
to convert identifiers to the appropriate supported case.Use getComparator()
for comparison - e.g. MIXED_CASE.getComparator("test", "Test") yields 0
.Enum Constant and Description |
---|
LOWER_CASE
Only lower case identifiers are supported.
|
LOWER_CASE_IGNORED_FOR_COMPARE
Mixed case is supported, but upper and lower case are indistinguishable, e.g.
|
MIXED_CASE
Mixed case identifiers are supported.
|
UPPER_CASE
Only upper case identifiers are supported.
|
Modifier and Type | Method and Description |
---|---|
String |
convertCase(String value)
Convert the given identifier to the
|
Comparator<String> |
getComparator()
UPPER_CASE .getComparator().compare("products", "PRODUCTS") will yield 0 . |
boolean |
isLowerCase()
true if identifiers are lower case. |
boolean |
isUpperCase()
true if identifiers are upper case. |
static CaseMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CaseMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CaseMode UPPER_CASE
public static final CaseMode LOWER_CASE
public static final CaseMode MIXED_CASE
public static final CaseMode LOWER_CASE_IGNORED_FOR_COMPARE
public static CaseMode[] values()
for (CaseMode c : CaseMode.values()) System.out.println(c);
public static CaseMode 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 null@NotNull public String convertCase(@NotNull String value)
value
- the string to convert.@NotNull public Comparator<String> getComparator()
UPPER_CASE
.getComparator().compare("products", "PRODUCTS") will yield 0
.public boolean isLowerCase()
true
if identifiers are lower case. Attention: isUpperCase()
and isLowerCase() may both deliver false
.true
if identifiers are lower case.()
public boolean isUpperCase()
true
if identifiers are upper case. Attention: isUpperCase() and isLowerCase()
may both deliver false
.true
if identifiers are upper case.isLowerCase()
Copyright © 2021 e-Spirit AG. All Rights Reserved. Build 5.2.210210