Package org.radarbase.schema.util
Class SchemaUtils
java.lang.Object
org.radarbase.schema.util.SchemaUtils
TODO.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceFunction that may throw an exception. -
Method Summary
Modifier and TypeMethodDescriptionapplyOrEmpty(SchemaUtils.ThrowingFunction<T, Stream<R>> func) Apply a throwing function, and if it throws, log it and let it return an empty Stream.Apply a throwing function, and if it throws, log it and let it return an empty Stream.static StringexpandClass(String classShorthand) Expand a class name with the group name if it starts with a dot.static StringTODO.static StringsnakeToCamelCase(String value) Converts given file name from snake_case to CamelCase.
-
Method Details
-
getProjectGroup
TODO.- Returns:
- TODO
-
expandClass
Expand a class name with the group name if it starts with a dot.- Parameters:
classShorthand- class name, possibly starting with a dot as a shorthand.- Returns:
- class name or
nullif null or empty.
-
snakeToCamelCase
Converts given file name from snake_case to CamelCase. This will cause underscores to be removed, and the next character to be uppercase. This only converts the value up to the first dot encountered.- Parameters:
value- file name in snake_case- Returns:
- main part of file name in CamelCase.
-
applyOrEmpty
public static <T,R> Function<T,Stream<R>> applyOrEmpty(SchemaUtils.ThrowingFunction<T, Stream<R>> func) Apply a throwing function, and if it throws, log it and let it return an empty Stream. -
applyOrIllegalException
public static <T,R> Function<T,Stream<R>> applyOrIllegalException(SchemaUtils.ThrowingFunction<T, Stream<R>> func) Apply a throwing function, and if it throws, log it and let it return an empty Stream.
-