Class Option.None<T>

  • Enclosing class:
    Option<T>

    public static class Option.None<T>
    extends Option<T>
    The None type, representing an absent value (instead of "null")
    • Constructor Summary

      Constructors 
      Constructor Description
      None()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T get()
      Get the value of the Option (if it is defined)
      boolean isDefined()
      Whether the Option is defined or not
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • None

        public None()
    • Method Detail

      • isDefined

        public boolean isDefined()
        Description copied from class: Option
        Whether the Option is defined or not
        Specified by:
        isDefined in class Option<T>
        Returns:
        true if the Option is defined (of type Some) false if the Option is not defined (of type None)
      • get

        public T get()
        Description copied from class: Option
        Get the value of the Option (if it is defined)
        Specified by:
        get in class Option<T>
        Returns:
        the value
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object