Class Maybe<T>

  • Type Parameters:
    T -

    public final class Maybe<T>
    extends Object
    A container that may be empty, may contain null, or may contain a value. Distinct from Optional, since Optional cannot contain null.
    • Method Detail

      • defined

        public static <T> Maybe<T> defined​(T nullableValue)
      • undefined

        public static <T> Maybe<T> undefined()
      • getNullableValue

        public T getNullableValue()
      • isDefined

        public boolean isDefined()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object