final case class Empty[A] extends Maybe[A] with Product with Serializable
- Source
- Maybe.scala
- Alphabetic
- By Inheritance
- Empty
- Serializable
- Product
- Equals
- Maybe
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def <\/[B](b: => B): \/[A, B]
alias for toLeft
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def \/>[B](b: => B): \/[B, A]
alias for toRight
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- final def cata[B](f: (A) => B, b: => B): B
Catamorphism.
Catamorphism. Run the given function on the underlying value if present, otherwise return the provided fallback value
- Definition Classes
- Maybe
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def cobind[B](f: (Maybe[A]) => B): Maybe[B]
- Definition Classes
- Maybe
- final def cojoin: Maybe[Maybe[A]]
- Definition Classes
- Maybe
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def exists(f: (A) => Boolean): Boolean
Return
true
if this is a Maybe.Just and the underlying value satisfies the provided predicateReturn
true
if this is a Maybe.Just and the underlying value satisfies the provided predicate- Definition Classes
- Maybe
- final def filter(f: (A) => Boolean): Maybe[A]
- Definition Classes
- Maybe
- final def filterNot(f: (A) => Boolean): Maybe[A]
- Definition Classes
- Maybe
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def first: FirstMaybe[A]
Tag with Tags.First
Tag with Tags.First
- Definition Classes
- Maybe
- final def flatMap[B](f: (A) => Maybe[B]): Maybe[B]
- Definition Classes
- Maybe
- final def forall(f: (A) => Boolean): Boolean
Return
true
if this is a Maybe.Empty or if this is a Maybe.Just and the underlying value satisfies the provided predicateReturn
true
if this is a Maybe.Empty or if this is a Maybe.Just and the underlying value satisfies the provided predicate- Definition Classes
- Maybe
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def getOrElse(a: => A): A
Return the underlying value if present, otherwise the provided fallback value
Return the underlying value if present, otherwise the provided fallback value
- Definition Classes
- Maybe
- final def getOrElseF[F[_]](fa: => F[A])(implicit arg0: Applicative[F]): F[A]
- Definition Classes
- Maybe
- final def isEmpty: Boolean
True if no underlying value is present
True if no underlying value is present
- Definition Classes
- Maybe
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def isJust: Boolean
True if an underlying value is present
True if an underlying value is present
- Definition Classes
- Maybe
- final def last: LastMaybe[A]
Tag with Tags.Last
- final def map[B](f: (A) => B): Maybe[B]
- Definition Classes
- Maybe
- final def max: MaxMaybe[A]
Tag with Tags.Max
- final def min: MinMaybe[A]
Tag with Tags.Min
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def orElse(oa: => Maybe[A]): Maybe[A]
Return this instance if it is a Maybe.Just, otherwise the provided fallback
Return this instance if it is a Maybe.Just, otherwise the provided fallback
- Definition Classes
- Maybe
- final def orEmpty[F[_]](implicit F: ApplicativePlus[F]): F[A]
Return the underlying value wrapped in type
F
if present, otherwise the empty value for typeF
Return the underlying value wrapped in type
F
if present, otherwise the empty value for typeF
- Definition Classes
- Maybe
- final def orError[F[_], E](e: E)(implicit F: MonadError[F, E]): F[A]
- Definition Classes
- Maybe
- final def orZero(implicit F: Monoid[A]): A
Return the underlying value if present, otherwise the monoid zero
Return the underlying value if present, otherwise the monoid zero
- Definition Classes
- Maybe
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final def toFailure[B](b: => B): Validation[A, B]
Turn the underlying value into a failure validation if present, otherwise return a success validation with the provided fallback value
Turn the underlying value into a failure validation if present, otherwise return a success validation with the provided fallback value
- Definition Classes
- Maybe
- final def toLeft[B](b: => B): \/[A, B]
Turn the underlying value into a left disjunction if present, otherwise return a right disjunction with the provided fallback value
Turn the underlying value into a left disjunction if present, otherwise return a right disjunction with the provided fallback value
- Definition Classes
- Maybe
- final def toOption: Option[A]
Convert to a standard library
Option
Convert to a standard library
Option
- Definition Classes
- Maybe
- final def toRight[B](b: => B): \/[B, A]
Turn the underlying value into a right disjunction if present, otherwise return a left disjunction with the provided fallback value
Turn the underlying value into a right disjunction if present, otherwise return a left disjunction with the provided fallback value
- Definition Classes
- Maybe
- final def toSuccess[B](b: => B): Validation[B, A]
Turn the underlying value into a success validation if present, otherwise return a failure validation with the provided fallback value
Turn the underlying value into a success validation if present, otherwise return a failure validation with the provided fallback value
- Definition Classes
- Maybe
- final def unary_~(implicit z: Monoid[A]): A
alias for orZero
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def zip[B](fb: Maybe[B]): Maybe[(A, B)]
- Definition Classes
- Maybe
- final def zipWith[B, C](fb: Maybe[B])(f: (A, B) => C): Maybe[C]
- Definition Classes
- Maybe
- final def |(a: => A): A
alias for getOrElse