@Test public void returnsAllNonesFromTheSuppliedIterable() { Iterable<Option<Integer>> options = iterableWith(some(10), none(Integer.class), some(20), some(30), none(Integer.class)); Iterable<Option<Integer>> expected = iterableWith(none(Integer.class), none(Integer.class)); Iterable<Option<Integer>> actual = Options.nones(options); assertThat(actual, hasOnlyItemsInOrder(expected)); }
public static <T> Iterable<Option<T>> nones(Iterable<Option<T>> options) { return Lazily.filter(options, Options.<T>isNone()); }
Options { public static <T> Iterable<Option<T>> nones(Iterable<Option<T>> options) { return Lazily.filter(options, Options.<T>isNone()); } }
Options { public static <T> Iterable<Option<T>> nones(Iterable<Option<T>> options) { return Lazily.filter(options, Options.<T>isNone()); }  }
Options { public static <T> Iterable<Option<T>> nones(Iterable<Option<T>> options) { return Lazily.filter(options, Options.<T>isNone()); }  static Iterable<Option<T>> somes(Iterable<Option<T>> options); static Iterable<Option<T>> nones(Iterable<Option<T>> options); static Predicate<Option<T>> isSome(); static Predicate<Option<T>> isNone(); static Predicate<Option<T>> hasValue(); static Predicate<Option<T>> hasNoValue(); static Mapper<Option<T>, T> toValue(); static Mapper<Option<T>, T> toValue(
            @SuppressWarnings("unused") Class<T> valueClass); static Iterable<T> flatten(Iterable<Option<T>> options); }
Options { public static <T> Iterable<Option<T>> nones(Iterable<Option<T>> options) { return Lazily.filter(options, Options.<T>isNone()); }  static Iterable<Option<T>> somes(Iterable<Option<T>> options); static Iterable<Option<T>> nones(Iterable<Option<T>> options); static Predicate<Option<T>> isSome(); static Predicate<Option<T>> isNone(); static Predicate<Option<T>> hasValue(); static Predicate<Option<T>> hasNoValue(); static Mapper<Option<T>, T> toValue(); static Mapper<Option<T>, T> toValue(
            @SuppressWarnings("unused") Class<T> valueClass); static Iterable<T> flatten(Iterable<Option<T>> options);  }