ToFloatNullableImpl implements NullableExpression<T, ToFloat<T>>, ToFloatNullable<T> { @Override public ToDoubleNullable<T> mapToDoubleIfPresent(FloatToDoubleFunction mapper) { return t -> isNull.test(t) ? null : mapper.applyAsDouble(original.applyAsFloat(t)); } ToFloatNullableImpl(ToFloat<T> original, Predicate<T> isNull); @Override ToFloat<T> inner(); @Override Predicate<T> isNullPredicate(); @Override Float apply(T t); @Override float applyAsFloat(T t); @Override ToFloat<T> orThrow(); @Override ToFloat<T> orElseGet(ToFloat<T> getter); @Override ToFloat<T> orElse(Float value); @Override ToDoubleNullable<T> mapToDoubleIfPresent(FloatToDoubleFunction mapper); @Override ToFloatNullable<T> mapIfPresent(FloatUnaryOperator mapper); @Override long hash(T object); @Override int compare(T first, T second); @Override boolean isNull(T object); @Override boolean isNotNull(T object); @Override boolean equals(Object o); @Override int hashCode();  }
@Test void mapToDoubleIfPresent() { final ToDoubleNullable<String> toDoubleNullable = instance .mapToDoubleIfPresent(f -> 1); assertNotNull(toDoubleNullable); assertEquals(1, toDoubleNullable.applyAsDouble("three")); assertNull(toDoubleNullable.apply(null)); }