API Reference
from(T input)
from(T input)
Description: Initializes the pipeline with an input value.
Parameters:
T input
- The initial input value.Returns:
Pipe4j<T>
- A new Pipe4j instance.
perform(ThrowableFunction<? super T, ? extends U, E> callable)
perform(ThrowableFunction<? super T, ? extends U, E> callable)
Description: Chains an action that takes the input from the previous step and returns a result.
Parameters:
callable
- A function that performs an action and returns a result.
Returns:
Pipe4j<U>
- A new Pipe4j instance with the result of the callable.
perform(ThrowableFunction<? super T, ? extends U, E> callable, Function<? super Throwable, ? extends U> fallback)
perform(ThrowableFunction<? super T, ? extends U, E> callable, Function<? super Throwable, ? extends U> fallback)
Description: Chains an action with exception handling. If an exception occurs, the fallback function is used.
Parameters:
callable
- A function that performs an action and returns a result.fallback
- A function that handles exceptions and returns a fallback value.
Returns:
Pipe4j<U>
- A new Pipe4j instance with the result of the callable or fallback.
get()
get()
Description: Ends the pipeline and returns the final result.
Returns:
T
- The final value produced by the pipeline.
Last updated