@Test public void should_return_null_if_null_input_is_provided() { assertThat(OptionalFunctions.intoUnwrapped().apply(null)).isNull(); }
public static <T> Function<Optional<T>, T> intoUnwrapped() { return new Function<Optional<T>, T>() { @Nullable @Override public T apply(Optional<T> input) { if (input == null) { return null; } return input.orElse(null); } }; }
OptionalFunctions { public static <T> Function<Optional<T>, T> intoUnwrapped() { return new Function<Optional<T>, T>() { @Nullable @Override public T apply(Optional<T> input) { if (input == null) { return null; } return input.orElse(null); } }; } }
OptionalFunctions { public static <T> Function<Optional<T>, T> intoUnwrapped() { return new Function<Optional<T>, T>() { @Nullable @Override public T apply(Optional<T> input) { if (input == null) { return null; } return input.orElse(null); } }; } private  OptionalFunctions(); }
OptionalFunctions { public static <T> Function<Optional<T>, T> intoUnwrapped() { return new Function<Optional<T>, T>() { @Nullable @Override public T apply(Optional<T> input) { if (input == null) { return null; } return input.orElse(null); } }; } private  OptionalFunctions(); static Function<Optional<T>, T> intoUnwrapped(); }
OptionalFunctions { public static <T> Function<Optional<T>, T> intoUnwrapped() { return new Function<Optional<T>, T>() { @Nullable @Override public T apply(Optional<T> input) { if (input == null) { return null; } return input.orElse(null); } }; } private  OptionalFunctions(); static Function<Optional<T>, T> intoUnwrapped();  }