Files
2019-11-07 02:40:58 +00:00

11 lines
330 B
Java

import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.Nullable;
class Foo {
@Contract(pure = true, value = "null -> fail; true -> true; false -> false")
private static boolean nonNullBoolean(@Nullable Boolean value) {
if (value == null) throw new IllegalArgumentException();
return value;
}
}