/** * Delegate call to public static org.assertj.core.api.filter.NotFilter org.assertj.core.api.Assertions.not(java.lang.Object) * {@link org.assertj.core.api.Assertions#not(java.lang.Object)} */ default NotFilter not(Object valueNotToMatch) { return Assertions.not(valueNotToMatch); }
/** * Create a {@link FilterOperator} to use in {@link AbstractIterableAssert#filteredOn(String, FilterOperator) * filteredOn(String, FilterOperation)} to express a filter keeping all Iterable elements whose property/field * value matches does not match the given value. * <p> * As often, an example helps: * <pre><code class='java'> Employee yoda = new Employee(1L, new Name("Yoda"), 800); * Employee obiwan = new Employee(2L, new Name("Obiwan"), 800); * Employee luke = new Employee(3L, new Name("Luke", "Skywalker"), 26); * Employee noname = new Employee(4L, null, 50); * * List<Employee> employees = newArrayList(yoda, luke, obiwan, noname); * * assertThat(employees).filteredOn("age", not(800)) * .containsOnly(luke, noname);</code></pre> * * @param valueNotToMatch the value not to match * @return the created "not" filter * @since 3.9.0 */ default NotFilter not(Object valueNotToMatch) { return Assertions.not(valueNotToMatch); }
/** * Create a {@link FilterOperator} to use in {@link AbstractIterableAssert#filteredOn(String, FilterOperator) * filteredOn(String, FilterOperation)} to express a filter keeping all Iterable elements whose property/field * value matches does not match the given value. * <p> * As often, an example helps: * <pre><code class='java'> Employee yoda = new Employee(1L, new Name("Yoda"), 800); * Employee obiwan = new Employee(2L, new Name("Obiwan"), 800); * Employee luke = new Employee(3L, new Name("Luke", "Skywalker"), 26); * Employee noname = new Employee(4L, null, 50); * * List<Employee> employees = newArrayList(yoda, luke, obiwan, noname); * * assertThat(employees).filteredOn("age", not(800)) * .containsOnly(luke, noname);</code></pre> * * @param valueNotToMatch the value not to match * @return the created "not" filter */ public static NotFilter not(Object valueNotToMatch) { return NotFilter.not(valueNotToMatch); }
/** * Create a {@link FilterOperator} to use in {@link AbstractIterableAssert#filteredOn(String, FilterOperator) * filteredOn(String, FilterOperation)} to express a filter keeping all Iterable elements whose property/field * value matches does not match the given value. * <p> * As often, an example helps: * * <pre><code class='java'> Employee yoda = new Employee(1L, new Name("Yoda"), 800); * Employee obiwan = new Employee(2L, new Name("Obiwan"), 800); * Employee luke = new Employee(3L, new Name("Luke", "Skywalker"), 26); * Employee noname = new Employee(4L, null, 50); * * List<Employee> employees = newArrayList(yoda, luke, obiwan, noname); * * assertThat(employees).filteredOn("age", not(800)) * .containsOnly(luke, noname);</code></pre> * * @param valueNotToMatch the value not to match * @return the created "not" filter */ public static NotFilter not(Object valueNotToMatch) { return NotFilter.not(valueNotToMatch); }