class JavaUtil { /** * Runtime checks, similar to the Kotlin standard library check method. */ public static void check(boolean condition, String message) { if (!condition) { throw new IllegalStateException(message); } } public static void check(boolean condition) { check(condition, "check failed"); } /** * Silence annoying IDE errors when drafting methods, similar to the Kotlin * standard library method. * For method stubs, simply `return TODO("Not implemented");`. */ @SuppressWarnings("UnusedReturnValue") public static T TODO(String message) { throw new IllegalStateException(message); } public static T TODO() { throw new IllegalStateException("TODO"); } }