← ZIO Prelude docs

Present

zio.prelude.data.Optional.Present
final case class Present[+A](get: A) extends Optional[A]

Optional value that is present

Type parameters

A

type of the value

Value parameters

get

the value

Attributes

Source
Optional.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Optional[A]
trait IterableOnce[A]
class Object
trait Matchable
class Any
Show all

Members list

Type members

Inherited classlikes

class WithFilter(p: A => Boolean)

Attributes

Inherited from:
Optional
Source
Optional.scala
Supertypes
class Object
trait Matchable
class Any

Value members

Concrete methods

override def isDefined: Boolean

Attributes

Definition Classes
Source
Optional.scala
override def isEmpty: Boolean

Attributes

Definition Classes
Source
Optional.scala
override def nonEmpty: Boolean

Attributes

Definition Classes
Source
Optional.scala

Inherited methods

final def collect[B](pf: PartialFunction[A, B]): Optional[B]

Attributes

Inherited from:
Optional
Source
Optional.scala
final def contains[A1 >: A](elem: A1): Boolean

Attributes

Inherited from:
Optional
Source
Optional.scala
final def exists(p: A => Boolean): Boolean

Attributes

Inherited from:
Optional
Source
Optional.scala
final def filter(p: A => Boolean): Optional[A]

Attributes

Inherited from:
Optional
Source
Optional.scala
final def filterNot(p: A => Boolean): Optional[A]

Attributes

Inherited from:
Optional
Source
Optional.scala
final def flatMap[B](f: A => Optional[B]): Optional[B]

Attributes

Inherited from:
Optional
Source
Optional.scala
final def flatten[B](implicit ev: A <:< Optional[B]): Optional[B]

Attributes

Inherited from:
Optional
Source
Optional.scala
final def fold[B](ifEmpty: => B)(f: A => B): B

Attributes

Inherited from:
Optional
Source
Optional.scala
final def forall(p: A => Boolean): Boolean

Attributes

Inherited from:
Optional
Source
Optional.scala
final def foreach[U](f: A => U): Unit

Attributes

Inherited from:
Optional
Source
Optional.scala
final def getOrElse[A0 >: A](default: => A0): A0

Attributes

Inherited from:
Optional
Source
Optional.scala
final override def iterator: Iterator[A]

Attributes

Definition Classes
Inherited from:
Optional
Source
Optional.scala
final override def knownSize: Int

Copied from Option.knownSize

Copied from Option.knownSize

Attributes

Definition Classes
Inherited from:
Optional
Source
Optional.scala
final def map[B](f: A => B): Optional[B]

Attributes

Inherited from:
Optional
Source
Optional.scala
final def orElse[B >: A](alternative: => Optional[B]): Optional[B]

Attributes

Inherited from:
Optional
Source
Optional.scala

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product
def stepper[S <: Stepper[_]](implicit shape: StepperShape[A, S]): S

Attributes

Inherited from:
IterableOnce
final def toChunk: Chunk[A]

Attributes

Inherited from:
Optional
Source
Optional.scala
final def toLeft[R](right: R): Either[A, R]

Attributes

Inherited from:
Optional
Source
Optional.scala
final def toList: List[A]

Attributes

Inherited from:
Optional
Source
Optional.scala
final def toOption: Option[A]

Converts this optional value to standard scala.Option

Converts this optional value to standard scala.Option

Attributes

Inherited from:
Optional
Source
Optional.scala
final def toRight[L](left: L): Either[L, A]

Attributes

Inherited from:
Optional
Source
Optional.scala
final def toVector: Vector[A]

Attributes

Inherited from:
Optional
Source
Optional.scala
final def withFilter(p: A => Boolean): WithFilter

Attributes

Inherited from:
Optional
Source
Optional.scala