@Test public void returnsFalseForIsSomeIfTheSuppliedOptionHasNoValue() { Option<Integer> option = none(); boolean result = Options.<Integer>isSome().evaluate(option); assertThat(result, is(false)); }
public static <T> Predicate<Option<T>> isSome() { return new Predicate<Option<T>>() { @Override public boolean evaluate(Option<T> option) { return option.hasValue(); } }; }
Options { public static <T> Predicate<Option<T>> isSome() { return new Predicate<Option<T>>() { @Override public boolean evaluate(Option<T> option) { return option.hasValue(); } }; } }
Options { public static <T> Predicate<Option<T>> isSome() { return new Predicate<Option<T>>() { @Override public boolean evaluate(Option<T> option) { return option.hasValue(); } }; }  }
Options { public static <T> Predicate<Option<T>> isSome() { return new Predicate<Option<T>>() { @Override public boolean evaluate(Option<T> option) { return option.hasValue(); } }; }  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> Predicate<Option<T>> isSome() { return new Predicate<Option<T>>() { @Override public boolean evaluate(Option<T> option) { return option.hasValue(); } }; }  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);  }