Interface HasMapToDoubleIfPresent<T,​MAPPER>

  • Type Parameters:
    T - the input entity type
    MAPPER - the functional interface used for mapping values
    All Known Subinterfaces:
    ToBooleanNullable<T>, ToByteNullable<T>, ToEnumNullable<T,​E>, ToFloatNullable<T>, ToIntNullable<T>, ToLongNullable<T>, ToShortNullable<T>

    public interface HasMapToDoubleIfPresent<T,​MAPPER>
    Trait for nullable expressions that can be mapped to a new expression of the same type by supplying a mapping function. If the value is present in the original expression, then it will be present in the new one as well. If the result of the original expression is null, then the new expression will evaluate to null also.
    Since:
    3.1.0
    Author:
    Emil Forslund
    • Method Detail

      • mapToDoubleIfPresent

        ToDoubleNullable<T> mapToDoubleIfPresent​(MAPPER mapper)
        Maps the result of this expression into a double by passing it to the specified mapper, producing a new expression that implements ToDouble. If this expression would have evaluated to null, then the new expression will as well.
        Parameters:
        mapper - the mapper to use on the result of this expression
        Returns:
        the new mapped expression