Interface IIterableContainMatchingExaminer

All Known Subinterfaces:
IIterableExaminer
All Known Implementing Classes:
IterableExaminer

public interface IIterableContainMatchingExaminer
Author:
Silvan Wyss
  • Method Details

    • containsMatching

      <T> boolean containsMatching(Iterable<T> iterable, Predicate<T> selector)
      Type Parameters:
      T - the type of the elements of the given iterable
      Parameters:
      iterable - the searched Iterable, is considered to be empty when is null
      selector - can select elements, is considered not to select any element when is null
      Returns:
      true if the given iterable contains an element the given selector selects, false otherwise. Ignores null elements in the given iterable.
    • containsMatchingOnly

      <T> boolean containsMatchingOnly(Iterable<T> iterable, Predicate<T> selector)
      Type Parameters:
      T - the type of the elements of the given iterable
      Parameters:
      iterable - the searched Iterable, is considered to be empty when is null
      selector - can select elements, is considered not to select any element when is null
      Returns:
      true if the given iterable contains only elements the given selector selects, false otherwise. Ignores null elements in the given iterable.
    • containsOneMatching

      <T> boolean containsOneMatching(Iterable<T> iterable, Predicate<T> selector)
      Type Parameters:
      T - the type of the elements of the given iterable
      Parameters:
      iterable - the searched Iterable, is considered to be empty when is null
      selector - can select elements, is considered not to select any element when is null
      Returns:
      true if the given iterable contains exactly 1 element the given selector selects, false otherwise. Ignores null elements in the given iterable.