Interface IIterableExaminer

All Known Implementing Classes:
IterableExaminer

public interface IIterableExaminer
Author:
Silvan Wyss
  • Method Details

    • containsElement

      boolean containsElement(Iterable<?> iterable, Object element)
      Parameters:
      iterable -
      element -
      Returns:
      true if the given iterable contains the given element, false otherwise.
    • containsElementMultipleTimes

      boolean containsElementMultipleTimes(Iterable<?> iterable, Object element)
      Parameters:
      iterable -
      element -
      Returns:
      true if the given iterable contains the given element multiple times, false otherwise.
    • containsElementOnce

      boolean containsElementOnce(Iterable<?> iterable, Object element)
      Parameters:
      iterable -
      element -
      Returns:
      true if the given iterable contains the given element exactly 1 time, false otherwise.
    • containsExactlyOneWithStringRepresentation

      boolean containsExactlyOneWithStringRepresentation(Iterable<?> iterable, String stringRepresentation)
      Parameters:
      iterable -
      stringRepresentation -
      Returns:
      true if the given iterable contains exactly 1 element with the given stringRepresentation, false otherwise.
    • isEmpty

      boolean isEmpty(Iterable<?> iterable)
      Parameters:
      iterable -
      Returns:
      true if the given iterable is empty, false otherwise.
      Throws:
      RuntimeException - if the given iterable is null.