/** * Create assertion for {@link java.util.Optional}. * * @param actual the actual value. * @param <VALUE> the type of the value contained in the {@link java.util.Optional}. * * @return the created assertion object. */ public static <VALUE> OptionalAssert<VALUE> assertThat(Optional<VALUE> actual) { return new OptionalAssert<>(actual); }
/** * Create assertion for {@link java.util.Optional}. * * @param actual the actual value. * @param <VALUE> the type of the value contained in the {@link java.util.Optional}. * * @return the created assertion object. */ @CheckReturnValue public static <VALUE> OptionalAssert<VALUE> assertThat(Optional<VALUE> actual) { return new OptionalAssert<>(actual); }
/** * Create assertion for {@link java.util.Optional}. * * @param optional the actual value. * @param <T> the type of the value contained in the {@link java.util.Optional}. * * @return the created assertion objet. */ public static <T> OptionalAssert<T> assertThat(Optional<T> optional) { return new OptionalAssert<>(optional); }