Interface KeyGenerator
public interface KeyGenerator
An interface to generated keys from strings.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final KeyGeneratorAKeyGeneratorimplementation that returns the given string as-is, or an empty string if the argument isnull.static final KeyGeneratorAKeyGeneratorimplementation that converts camelCase to kebab-case.static final KeyGeneratorAKeyGeneratorimplementation that converts camelCase to snake_case. -
Method Summary
-
Field Details
-
AS_IS
AKeyGeneratorimplementation that returns the given string as-is, or an empty string if the argument isnull. -
CAMEL_TO_KEBAB
AKeyGeneratorimplementation that converts camelCase to kebab-case. -
CAMEL_TO_SNAKE
AKeyGeneratorimplementation 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
-