@Test(expected = NullPointerException.class) public void shouldThrowANullPointerExceptionIfIterableSuppliedToEmptyCheckIsNull() throws Exception { Iterable<String> input = null; Checks.returnOrThrowIfEmpty(input, runtimeFactory()); }
public static <S, T extends Iterable<S>> T returnOrThrowIfEmpty( T value, NullaryFunction<? extends RuntimeException> exceptionFactory) { return orThrowIf( value, !value.iterator().hasNext(), exceptionFactory); }
Checks { public static <S, T extends Iterable<S>> T returnOrThrowIfEmpty( T value, NullaryFunction<? extends RuntimeException> exceptionFactory) { return orThrowIf( value, !value.iterator().hasNext(), exceptionFactory); } }
Checks { public static <S, T extends Iterable<S>> T returnOrThrowIfEmpty( T value, NullaryFunction<? extends RuntimeException> exceptionFactory) { return orThrowIf( value, !value.iterator().hasNext(), exceptionFactory); }  }
Checks { public static <S, T extends Iterable<S>> T returnOrThrowIfEmpty( T value, NullaryFunction<? extends RuntimeException> exceptionFactory) { return orThrowIf( value, !value.iterator().hasNext(), exceptionFactory); }  static T returnOrThrowIfNull(T value, NullaryFunction<? extends RuntimeException> exceptionFactory); static T returnOrThrowIfEmpty(
            T value, NullaryFunction<? extends RuntimeException> exceptionFactory); static T returnOrThrowIfContainsNull(T iterable); }
Checks { public static <S, T extends Iterable<S>> T returnOrThrowIfEmpty( T value, NullaryFunction<? extends RuntimeException> exceptionFactory) { return orThrowIf( value, !value.iterator().hasNext(), exceptionFactory); }  static T returnOrThrowIfNull(T value, NullaryFunction<? extends RuntimeException> exceptionFactory); static T returnOrThrowIfEmpty(
            T value, NullaryFunction<? extends RuntimeException> exceptionFactory); static T returnOrThrowIfContainsNull(T iterable);  }