Top Description Methods
org.jruby.util.func

public Interface FunctionOneOrTwoOrThree<T, U, V, R>

extends Function<T, R>, BiFunction<T, U, R>, TriFunction<T, U, V, R>
Known Direct Implementers
org.jruby.runtime.Block
Type Parameters
<T>
first argument type for apply
<U>
second argument type for apply
<V>
third argument type for apply
<R>
return value type for apply
Imports
java.util.function.BiFunction, .Function

An aggregate interface for Function and BiFunction that properly replaces the default andThen(Function) for both superinterfaces.

Method Summary

Modifier and TypeMethod and Description
public default <W> FunctionOneOrTwoOrThree<T, U, V, W>
andThen(Function<? super R, ? extends W>
the function to apply after this function is applied
after
)

Overrides default java.util.function.Function.andThen, java.util.function.BiFunction.andThen, org.jruby.util.func.TriFunction.andThen.

Returns a composed function that first applies this function to its input, and then applies the after function to the result.

Inherited from java.util.function.BiFunction:
apply
Inherited from java.util.function.Function:
applycomposeidentity
Inherited from org.jruby.util.func.TriFunction:
apply

Method Detail

andThenback to summary
public default <W> FunctionOneOrTwoOrThree<T, U, V, W> andThen(Function<? super R, ? extends W> after)

Overrides default java.util.function.Function.andThen, java.util.function.BiFunction.andThen, org.jruby.util.func.TriFunction.andThen.

Doc from java.util.function.Function.andThen.

Returns a composed function that first applies this function to its input, and then applies the after function to the result. If evaluation of either function throws an exception, it is relayed to the caller of the composed function.

Parameters
<W>
the type of output of the after function, and of the composed function
after:Function<? super R, ? extends W>

the function to apply after this function is applied

Returns:FunctionOneOrTwoOrThree<T, U, V, W>

a composed function that first applies this function and then applies the after function

Annotations
@Override