Package no.acntech.kollectiveq.util.lang
Class FunctionsKt
-
- All Implemented Interfaces:
public final class FunctionsKt
-
-
Field Summary
Fields Modifier and Type Field Description private final static Function1<String, String>snakeToCamelTransformer
-
Method Summary
Modifier and Type Method Description final Function1<String, String>getSnakeToCamelTransformer()final static <T extends Any> Function1<T, T>identityTransform()Transform function that takes an input of type T and returns the the input itself. final static Function1<String, String>createCaseFormatTransformFunction(CaseFormat fromFormat, CaseFormat toFormat)Transform function that will transform a String from one CaseFormat to another. final static Map<String, Object>toMap(Object $self, Map<String, Object> defaultOverrides)Converts an object to a map of property names and values, overriding any values with the same key with the fallback map. final static StringprettyPrintMe(Object $self, Map<String, Object> fallbackMap)Pretty prints an object to a string. -
-
Method Detail
-
getSnakeToCamelTransformer
final Function1<String, String> getSnakeToCamelTransformer()
-
identityTransform
final static <T extends Any> Function1<T, T> identityTransform()
Transform function that takes an input of type T and returns the the input itself.
-
createCaseFormatTransformFunction
final static Function1<String, String> createCaseFormatTransformFunction(CaseFormat fromFormat, CaseFormat toFormat)
Transform function that will transform a String from one CaseFormat to another.
- Parameters:
fromFormat- The CaseFormat to transform from.toFormat- The CaseFormat to transform to.
-
toMap
final static Map<String, Object> toMap(Object $self, Map<String, Object> defaultOverrides)
Converts an object to a map of property names and values, overriding any values with the same key with the fallback map.
-
-
-
-