Interface IIterableCountSearcher

All Known Subinterfaces:
IIterableSearcher
All Known Implementing Classes:
IterableSearcher

public interface IIterableCountSearcher
Author:
Silvan Wyss
  • Method Details

    • getCount

      int getCount(Iterable<?> iterable)
      Parameters:
      iterable - the examined Iterable, is considered to be empty when is null
      Returns:
      the number of elements of the given iterable
    • getCount

      <E> int getCount(Iterable<E> iterable, Predicate<E> selector)
      Type Parameters:
      E - the type of the elements of the given iterable
      Parameters:
      iterable - the examined Iterable, is considered to be empty when is null
      selector - can select elements, ignores null elements, is considered not to select any element when is null
      Returns:
      the number of elements the given selector selects from the given iterable
    • getCountOf

      int getCountOf(Iterable<?> iterable, Object object)
      Parameters:
      iterable - the examined Iterable, is considered to be empty when is null
      object -
      Returns:
      the number of occurrences of the given object in the given iterable