Interface KeyGenerator
public interface KeyGenerator
An interface to generated keys from strings.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final KeyGenerator
AKeyGenerator
implementation that returns the given string as-is, or an empty string if the argument isnull
.static final KeyGenerator
AKeyGenerator
implementation that converts camelCase to kebab-case.static final KeyGenerator
AKeyGenerator
implementation that converts camelCase to snake_case. -
Method Summary
-
Field Details
-
AS_IS
AKeyGenerator
implementation that returns the given string as-is, or an empty string if the argument isnull
. -
CAMEL_TO_KEBAB
AKeyGenerator
implementation that converts camelCase to kebab-case. -
CAMEL_TO_SNAKE
AKeyGenerator
implementation that converts camelCase to snake_case.
-
-
Method Details
-
generate
Generates the key from the given string.- Parameters:
source
- the string to generate the key- Returns:
- the generated key
-