case object JsonNull extends JsonOption[Nothing] with JsonEmpty with Product with Serializable

This case object represents null values.

Linear Supertypes
Serializable, Product, Equals, JsonEmpty, JsonOption[Nothing], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. JsonNull
  2. Serializable
  3. Product
  4. Equals
  5. JsonEmpty
  6. JsonOption
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. class WithFilter extends AnyRef

    We need a whole WithFilter class to honor the "doesn't create a new collection" contract even though it seems unlikely to matter much in a collection with max size 1.

    We need a whole WithFilter class to honor the "doesn't create a new collection" contract even though it seems unlikely to matter much in a collection with max size 1.

    Definition Classes
    JsonOption

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  6. final def collect[B](pf: PartialFunction[Nothing, B]): JsonOption[B]

    Returns a JsonSome containing the result of applying pf to this JsonOption's contained value, if this option is nonempty and pf is defined for that value.

    Returns a JsonSome containing the result of applying pf to this JsonOption's contained value, if this option is nonempty and pf is defined for that value. Returns JsonAbsent otherwise.

    pf

    the partial function.

    returns

    the result of applying pf to this JsonOption's value (if possible), or JsonAbsent.

    Definition Classes
    JsonOption
    Annotations
    @inline()
    Example:
    1. // Returns Some(HTTP) because the partial function covers the case.
      Some("http") collect {case "http" => "HTTP"}
      
      // Returns None because the partial function doesn't cover the case.
      Some("ftp") collect {case "http" => "HTTP"}
      
      // Returns None because None is passed to the collect method.
      None collect {case value => value}
  7. final def contains[A1 >: Nothing](elem: A1): Boolean

    Tests whether the option contains a given value as an element.

    Tests whether the option contains a given value as an element.

    elem

    the element to test.

    returns

    true if the option has an element that is equal (as determined by ==) to elem, false otherwise.

    Definition Classes
    JsonOption
    Example:
    1. // Returns true because Some instance contains string "something" which equals "something".
      Some("something") contains "something"
      
      // Returns false because "something" != "anything".
      Some("something") contains "anything"
      
      // Returns false when method called on None.
      None contains "anything"
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. final def exists(p: (Nothing) => Boolean): Boolean

    Returns true if this option is nonempty and the predicate p returns true when applied to this JsonOption's value.

    Returns true if this option is nonempty and the predicate p returns true when applied to this JsonOption's value. Otherwise, returns false.

    p

    the predicate to test

    Definition Classes
    JsonOption
    Annotations
    @inline()
  11. final def filter(p: (Nothing) => Boolean): JsonOption[Nothing]

    Returns this JsonOption if it is nonempty and applying the predicate p to this JsonOption's value returns true.

    Returns this JsonOption if it is nonempty and applying the predicate p to this JsonOption's value returns true. Otherwise, return JsonAbsent.

    p

    the predicate used for testing.

    Definition Classes
    JsonOption
    Annotations
    @inline()
  12. final def filterNot(p: (Nothing) => Boolean): JsonOption[Nothing]

    Returns this JsonOption if it is nonempty and applying the predicate p to this JsonOption's value returns false.

    Returns this JsonOption if it is nonempty and applying the predicate p to this JsonOption's value returns false. Otherwise, return JsonAbsent.

    p

    the predicate used for testing.

    Definition Classes
    JsonOption
    Annotations
    @inline()
  13. final def flatMap[B](f: (Nothing) => JsonOption[B]): JsonOption[B]

    Returns the result of applying f to this JsonOption's value if this JsonOption is nonempty.

    Returns the result of applying f to this JsonOption's value if this JsonOption is nonempty. Returns JsonAbsent if this JsonOption is empty. Slightly different from map in that f is expected to return an JsonOption (which could be JsonAbsent).

    f

    the function to apply

    Definition Classes
    JsonOption
    Annotations
    @inline()
    See also

    map

    foreach

  14. def flatten[B](implicit ev: <:<[Nothing, JsonOption[B]]): JsonOption[B]
    Definition Classes
    JsonOption
  15. final def fold[B](ifEmpty: => B)(f: (Nothing) => B): B

    Returns the result of applying f to this JsonOption's value if the JsonOption is nonempty.

    Returns the result of applying f to this JsonOption's value if the JsonOption is nonempty. Otherwise, evaluates expression ifEmpty.

    ifEmpty

    the expression to evaluate if empty.

    f

    the function to apply if nonempty.

    Definition Classes
    JsonOption
    Annotations
    @inline()
    Note

    This is equivalent to JsonOption map f getOrElse ifEmpty.

  16. final def forall(p: (Nothing) => Boolean): Boolean

    Returns true if this option is empty or the predicate p returns true when applied to this JsonOption's value.

    Returns true if this option is empty or the predicate p returns true when applied to this JsonOption's value.

    p

    the predicate to test

    Definition Classes
    JsonOption
    Annotations
    @inline()
  17. final def foreach[U](f: (Nothing) => U): Unit

    Apply the given procedure f to the option's value, if it is nonempty.

    Apply the given procedure f to the option's value, if it is nonempty. Otherwise, do nothing.

    f

    the procedure to apply.

    Definition Classes
    JsonOption
    Annotations
    @inline()
    See also

    map

    flatMap

  18. def get: Nothing

    Returns the maybe's value.

    Returns the maybe's value.

    Definition Classes
    JsonNullJsonEmptyJsonOption
    Exceptions thrown

    java.util.NoSuchElementException if the maybe is empty

    Note

    The maybe must be nonEmpty

  19. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  20. final def getOrElse[B >: Nothing](default: => B): B

    Returns the maybe's value if the maybe is nonempty, otherwise return the result of evaluating default.

    Returns the maybe's value if the maybe is nonempty, otherwise return the result of evaluating default.

    default

    the default expression.

    Definition Classes
    JsonOption
    Annotations
    @inline()
  21. def isAbsent: Boolean

    Returns true if maybe is nothing

    Returns true if maybe is nothing

    Definition Classes
    JsonNullJsonOption
  22. def isDefined: Boolean

    Returns true if maybe is instance of just

    Returns true if maybe is instance of just

    Definition Classes
    JsonOption
  23. def isEmpty: Boolean

    Returns true if maybe is nothing or null

    Returns true if maybe is nothing or null

    Definition Classes
    JsonEmptyJsonOption
  24. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  25. def iterator: Iterator[Nothing]

    Returns a singleton iterator returning the JsonOption's value if it is nonempty, or an empty iterator if the option is empty.

    Returns a singleton iterator returning the JsonOption's value if it is nonempty, or an empty iterator if the option is empty.

    Definition Classes
    JsonOption
  26. final def map[B](f: (Nothing) => B): JsonOption[B]

    Returns a JsonSome containing the result of applying f to this JsonOption's value if this JsonOption is nonempty.

    Returns a JsonSome containing the result of applying f to this JsonOption's value if this JsonOption is nonempty. Otherwise return JsonAbsent.

    f

    the function to apply

    Definition Classes
    JsonOption
    Annotations
    @inline()
    Note

    This is similar to flatMap except here, f does not need to wrap its result in an JsonOption.

    See also

    flatMap

    foreach

  27. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  28. final def nonEmpty: Boolean

    Returns false if the option is JsonAbsent, true otherwise.

    Returns false if the option is JsonAbsent, true otherwise.

    Definition Classes
    JsonOption
    Note

    Implemented here to avoid the implicit conversion to Iterable.

  29. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  30. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  31. final def orElse[B >: Nothing](alternative: => JsonOption[B]): JsonOption[B]

    Returns this JsonOption if it is nonempty, otherwise return the result of evaluating alternative.

    Returns this JsonOption if it is nonempty, otherwise return the result of evaluating alternative.

    alternative

    the alternative expression.

    Definition Classes
    JsonOption
    Annotations
    @inline()
  32. final def orNull[A1 >: Nothing](implicit ev: <:<[Null, A1]): A1

    Returns the option's value if it is nonempty, or null if it is empty.

    Returns the option's value if it is nonempty, or null if it is empty. Although the use of null is discouraged, code written to use JsonOption must often interface with code that expects and returns nulls.

    Definition Classes
    JsonOption
    Annotations
    @inline()
    Example:
    1. val initialText: Option[String] = getInitialText
      val textField = new JComponent(initialText.orNull,20)
  33. def productElementName(n: Int): String
    Definition Classes
    Product
  34. def productElementNames: Iterator[String]
    Definition Classes
    Product
  35. def someOrElse[B >: Nothing](x: Option[B]): Option[B]

    Helper function to .orElse JsonSome.

    Helper function to .orElse JsonSome. Result is None for JsonNull but for JsonAbsent x param is returned

    Definition Classes
    JsonOption
  36. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  37. final def toLeft[X](right: => X): Either[Nothing, X]

    Returns a scala.util.Right containing the given argument right if this is empty, or a scala.util.Left containing this JsonOption's value if this JsonOption is nonempty.

    Returns a scala.util.Right containing the given argument right if this is empty, or a scala.util.Left containing this JsonOption's value if this JsonOption is nonempty.

    right

    the expression to evaluate and return if this is empty

    Definition Classes
    JsonOption
    Annotations
    @SuppressWarnings() @inline()
    See also

    toRight

  38. def toList: List[Nothing]

    Returns a singleton list containing the JsonOption's value if it is nonempty, or the empty list if the JsonOption is empty.

    Returns a singleton list containing the JsonOption's value if it is nonempty, or the empty list if the JsonOption is empty.

    Definition Classes
    JsonOption
  39. def toOption: Option[Nothing]

    Turns this JsonOption into scala Option

    Turns this JsonOption into scala Option

    Definition Classes
    JsonEmptyJsonOption
  40. final def toRight[X](left: => X): Either[X, Nothing]

    Returns a scala.util.Left containing the given argument left if this JsonOption is empty, or a scala.util.Right containing this JsonOption's value if this is nonempty.

    Returns a scala.util.Left containing the given argument left if this JsonOption is empty, or a scala.util.Right containing this JsonOption's value if this is nonempty.

    left

    the expression to evaluate and return if this is empty

    Definition Classes
    JsonOption
    Annotations
    @SuppressWarnings() @inline()
    See also

    toLeft

  41. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  42. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  43. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  44. final def withFilter(p: (Nothing) => Boolean): WithFilter

    Necessary to keep JsonOption from being implicitly converted to scala.collection.Iterable in for comprehensions.

    Necessary to keep JsonOption from being implicitly converted to scala.collection.Iterable in for comprehensions.

    Definition Classes
    JsonOption
    Annotations
    @inline()

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from JsonEmpty

Inherited from JsonOption[Nothing]

Inherited from AnyRef

Inherited from Any

Ungrouped