object Complete extends Endo[Any, Nothing] with Endo[Any, Nothing]
A stage that immediately signals pipeline completion without dropping the input value.
Complete always yields h8io.stages.Status.Complete while still passing the input through as the output. It is
useful as the terminal element in a pipeline to stop further processing after a condition is met (see
h8io.stages.operators.CompleteIfSome).
The singleton operates on Any and can be safely cast to any Fruitful.Endo[T] via apply[T].
- Source
- Complete.scala
- Alphabetic
- By Inheritance
- Complete
- SAMStage
- Stagnation
- Evolution
- Fruitful
- Stage
- Function1
- 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 ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def andThen[A](g: (Yield[Any, Any, Nothing]) => A): (Any) => A
- Definition Classes
- Function1
- Annotations
- @unspecialized()
- def apply(in: Any): Some[Any, Any, Nothing]
Applies this stage to the given input, producing a Yield.
- def apply[T]: Endo[T, Nothing]
Returns a typed view of this singleton as a
Fruitful.Endo[T].Returns a typed view of this singleton as a
Fruitful.Endo[T].- T
the concrete value type
- 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()
- final def compose[_O, _E >: Nothing](that: Evolution[Any, _O, _E]): Evolution[Any, _O, _E]
Composes this evolution with another, creating a new evolution whose continuation for any status is the sequential composition of the corresponding continuations of both evolutions.
Composes this evolution with another, creating a new evolution whose continuation for any status is the sequential composition of the corresponding continuations of both evolutions.
Specifically:
composed(s) == self(s) ~> that(s)
Used internally when merging evolutions during Yield composition inside Stage.AndThen.
- _O
the output type of the resulting stages
- _E
the combined error type
- that
the downstream evolution to compose with
- returns
a new evolution representing
selffollowed bythat
- Definition Classes
- Evolution
- Annotations
- @inline()
- def compose[A](g: (A) => Any): (A) => Yield[Any, Any, Nothing]
- Definition Classes
- Function1
- Annotations
- @unspecialized()
- def dispose(): Unit
Releases all resources held by the Stage that produced this evolution.
Releases all resources held by the Stage that produced this evolution.
After this call the producing stage must be considered permanently unusable — it must not be applied or skipped again. This is the exclusive cleanup point for resources owned by the producing stage.
Called when the producing stage is permanently shut down:
- by Stage.execute after the pipeline has produced its terminal Outcome, so the continuation is released immediately rather than carried forward;
- when
applythrows aThrowable, since the stage can no longer be used and all its resources must still be released.
Implementations that hold no external resources may leave this as a no-op.
- Definition Classes
- Stagnation → Evolution
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def evolve(status: Status[_]): Stage[Any, Any, Nothing]
Returns the next Stage based on the given
status.Returns the next Stage based on the given
status.May release resources that are specific to this evolution instance and will not be reused by subsequent generations (i.e. resources not needed by the returned stage or its own evolution).
- status
the status that determines the continuation stage
- Definition Classes
- Stagnation → Evolution
- final def execute(in: Any): Outcome[Any, Nothing]
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()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def map[_I, _O, _E](f: (Stage[Any, Any, Nothing]) => Stage[_I, _O, _E]): Evolution[_I, _O, _E]
Transforms every continuation of this evolution by applying
fto the stage it returns.Transforms every continuation of this evolution by applying
fto the stage it returns.This is the public API for adapting an
Evolutionto a different stage type without exposing internal composition details.- _I
the input type of the resulting stages
- _O
the output type of the resulting stages
- _E
the error type of the resulting stages
- f
a function that transforms each continuation stage
- returns
a new evolution with all continuations mapped by
f
- Definition Classes
- Evolution
- Annotations
- @inline()
- 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()
- final def skip(): Evolution[Any, Any, Nothing]
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 >: Nothing](that: Stage[Any, _O, _E]): Stage[Any, _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)