Interface IIterableContainMatchingExaminer
- All Known Subinterfaces:
IIterableExaminer
- All Known Implementing Classes:
IterableExaminer
public interface IIterableContainMatchingExaminer
- Author:
- Silvan Wyss
-
Method Summary
Modifier and TypeMethodDescription<T> booleancontainsMatching(Iterable<T> iterable, Predicate<T> selector) <T> booleancontainsMatchingOnly(Iterable<T> iterable, Predicate<T> selector) <T> booleancontainsOneMatching(Iterable<T> iterable, Predicate<T> selector)
-
Method Details
-
containsMatching
- Type Parameters:
T- the type of the elements of the given iterable- Parameters:
iterable- the searchedIterable, is considered to be empty when is nullselector- 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
- Type Parameters:
T- the type of the elements of the given iterable- Parameters:
iterable- the searchedIterable, is considered to be empty when is nullselector- 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
- Type Parameters:
T- the type of the elements of the given iterable- Parameters:
iterable- the searchedIterable, is considered to be empty when is nullselector- 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.
-