Interface HasCompose<T>
-
- All Known Subinterfaces:
JoiningExpression<T>,ToBigDecimal<T>,ToBigDecimalNullable<T>,ToBigDecimalOrElse<T>,ToBigDecimalOrElseGet<T>,ToBigDecimalOrThrow<T>,ToBoolean<T>,ToBooleanNullable<T>,ToBooleanOrElse<T>,ToBooleanOrElseGet<T>,ToBooleanOrThrow<T>,ToByte<T>,ToByteNullable<T>,ToByteOrElse<T>,ToByteOrElseGet<T>,ToByteOrThrow<T>,ToChar<T>,ToCharNullable<T>,ToCharOrElse<T>,ToCharOrElseGet<T>,ToCharOrThrow<T>,ToDouble<T>,ToDoubleNullable<T>,ToDoubleOrElse<T>,ToDoubleOrElseGet<T>,ToDoubleOrThrow<T>,ToEnum<T,E>,ToEnumNullable<T,E>,ToEnumOrElse<T,E>,ToEnumOrElseGet<T,E>,ToEnumOrThrow<T,E>,ToFloat<T>,ToFloatNullable<T>,ToFloatOrElse<T>,ToFloatOrElseGet<T>,ToFloatOrThrow<T>,ToInt<T>,ToIntNullable<T>,ToIntOrElse<T>,ToIntOrElseGet<T>,ToIntOrThrow<T>,ToLong<T>,ToLongNullable<T>,ToLongOrElse<T>,ToLongOrElseGet<T>,ToLongOrThrow<T>,ToShort<T>,ToShortNullable<T>,ToShortOrElse<T>,ToShortOrElseGet<T>,ToShortOrThrow<T>,ToString<T>,ToStringNullable<T>,ToStringOrElse<T>,ToStringOrElseGet<T>,ToStringOrThrow<T>
public interface HasCompose<T>Trait for expressions that has acompose(Function)method similar toFunction.compose(Function), but even primitive expressions might implement this trait.- Since:
- 1.2.0
- Author:
- Emil Forslund
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <V> Expression<V>compose(Function<? super V,? extends T> before)Returns a composed expression that first applies thebeforefunction to its input, and then applies this function to the result.
-
-
-
Method Detail
-
compose
<V> Expression<V> compose(Function<? super V,? extends T> before)
Returns a composed expression that first applies thebeforefunction to its input, and then applies this function to the result. If evaluation of either function throws an exception, it is relayed to the caller of the composed function.- Type Parameters:
V- the type of input to thebeforefunction, and to the composed expression- Parameters:
before- the function to apply before this function is applied- Returns:
- a composed function that first applies the
beforefunction and then applies this function - Throws:
NullPointerException- if before is null
-
-