final case class Lift[I, O, E](alterand: Stage[I, O, E]) extends Alterator[Stage[I, O, E], I, Option[O], E] with Fruitful[I, Option[O], E] with Product with Serializable
A decorator that wraps a stage's optional output into an Option, making the result always present.
- If the inner stage yields
h8io.stages.Yield.Some(v, ...),Liftproducesh8io.stages.Yield.Some(Some(v), ...). - If the inner stage yields
h8io.stages.Yield.None(...),Liftproducesh8io.stages.Yield.Some(None, ...).
Because Lift always emits a value, it extends h8io.stages.base.Fruitful. The evolution of the result is mapped
so that every continuation stage is also wrapped in Lift, preserving the lifting semantics across the entire
pipeline.
Lift is the inverse of h8io.stages.projections.Unlift.
- I
the input type
- O
the inner output type; the outer output type becomes
Option[O]- E
the error type
- alterand
the inner stage whose output is optionally present
- Source
- Lift.scala
- Alphabetic
- By Inheritance
- Lift
- Serializable
- Product
- Equals
- Fruitful
- Alterator
- Stage
- Function1
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val alterand: Stage[I, O, E]
The wrapped stage whose behavior is modified by this operator.
- def andThen[A](g: (Yield[I, Option[O], E]) => A): (I) => A
- Definition Classes
- Function1
- Annotations
- @unspecialized()
- def apply(in: I): Some[I, Option[O], E]
Applies this stage to the given input, producing a Yield.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- def compose[A](g: (A) => I): (A) => Yield[I, Option[O], E]
- Definition Classes
- Function1
- Annotations
- @unspecialized()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def execute(in: I): Outcome[Option[O], E]
Executes this stage end-to-end and returns a plain Outcome.
Executes this stage end-to-end and returns a plain Outcome.
Internally this method:
- Applies the stage to
in, obtaining a Yield. - Disposes the Evolution carried by the Yield — since
executeis a terminal operation, the continuation is not needed and the resources held by this stage must be released immediately. - Wraps the result in an Outcome.Some or Outcome.None.
Disposal failures do not prevent the result from being returned. Any non-fatal exception raised by Evolution.dispose is captured in Outcome.disposeFailure and the outcome is still produced. Fatal exceptions are not caught and will propagate.
- in
the input value
- returns
Outcome.Some if this stage produced an output, Outcome.None otherwise
- Definition Classes
- Stage
- Annotations
- @inline()
- Applies the stage to
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def skip(): Evolution[I, Option[O], E]
Returns the Evolution for this stage without processing any input.
Returns the Evolution for this stage without processing any input.
Any stage that participates in a pipeline run but does not process the current input must call
skip()instead ofapply. Common triggers: an upstream stage produced no output (Yield.None), or a non-inclusive binary operation excluded this branch. The stage must return its Evolution as it would have appeared had it run, but must not perform any side effects or consume input.See the Lifecycle section in Stage for the full contract.
- returns
the Evolution representing how the pipeline should continue from this stage
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- Function1 → AnyRef → Any
- 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 wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def ~>[_O, _E >: E](that: Stage[Option[O], _O, _E]): Stage[I, _O, _E]
Composes this stage with
that, producing a new stage that feeds the output of this stage intothat.Composes this stage with
that, producing a new stage that feeds the output of this stage intothat.The resulting Stage.AndThen feeds the output of this stage into
that. If this stage produces an output, the statuses and evolutions of both stages are merged; if it produces no output, only the evolutions are composed andthatis not invoked for the current input.- _O
the output type of the composed pipeline
- _E
the combined error type (must be a supertype of
E)- that
the stage to execute after this one
- returns
a composed stage
this ~> that
- Definition Classes
- Stage
- Annotations
- @inline()
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)