@AnnotatedFor("nullness") public final class Opt extends Object
Utility class providing every method in Optional, but written for possibly-null references rather than for the Optional type.

To avoid the need to write the Opt class name at invocation sites, do:

import static org.checkerframework.checker.nullness.util.Opt.orElse;
import static org.checkerframework.checker.nullness.util.Opt.*;

Runtime Dependency: If you use this class, you must distribute (or link to) checker-qual.jar, along with your binaries. Or, you can copy this class into your own project.

See Also: