3 ms·
Google provides Optional<T> as part of the Guava library, so this is a fairly well-known idea. I find it fairly tedious to use though. The @NotNull annotation
by justinsb 14y ago
Google provides Optional<T> as part of the Guava library, so this is a fairly well-known idea. I find it fairly tedious to use though.
The @NotNull annotation seems like it should be the answer, but I don't know of anyone that uses it. Would love to hear if anyone has figured out how to get value out of @NotNull!