Class Opt.Empty<T>

  • Type Parameters:
    T - Type of item
    All Implemented Interfaces:
    Opt<T>
    Enclosing interface:
    Opt<T>

    public static final class Opt.Empty<T>
    extends Object
    implements Opt<T>
    Empty instance.

    The class is immutable and thread-safe.

    Since:
    0.14
    • Constructor Detail

      • Empty

        public Empty()
    • Method Detail

      • get

        public T get()
        Description copied from interface: Opt
        Returns the contained instance.
        Specified by:
        get in interface Opt<T>
        Returns:
        Instance
      • has

        public boolean has()
        Description copied from interface: Opt
        Returns true if contains instance.
        Specified by:
        has in interface Opt<T>
        Returns:
        True if present