Interface IIterableContainAnyExaminer

All Known Subinterfaces:
IIterableExaminer
All Known Implementing Classes:
IterableExaminer

public interface IIterableContainAnyExaminer
Author:
Silvan Wyss
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    containsAny(Iterable<?> iterable)
    The time complexity of this method is O(1).
    boolean
    The time complexity of this method is O(n) if the given iterable contains n elements.
    boolean
    containsOne(Iterable<?> iterable)
    The time complexity of this method is O(1).
    boolean
    The time complexity of this method is O(n) if the given iterable contains n elements.
    boolean
    isEmpty(Iterable<?> iterable)
    The time complexity of this method is O(1).
  • Method Details

    • containsAny

      boolean containsAny(Iterable<?> iterable)
      The time complexity of this method is O(1).
      Parameters:
      iterable - the searched Iterable, is considered to be empty when is null
      Returns:
      true if the given iterable contains an element, false otherwise
    • containsNonNull

      boolean containsNonNull(Iterable<?> iterable)
      The time complexity of this method is O(n) if the given iterable contains n elements.
      Parameters:
      iterable - the searched Iterable, is considered to be empty when is null
      Returns:
      true if the given iterable contains a non-null element, false otherwise
    • containsOne

      boolean containsOne(Iterable<?> iterable)
      The time complexity of this method is O(1).
      Parameters:
      iterable - the searched Iterable, is considered to be empty when is null
      Returns:
      true if the given iterable contains exactly 1 element, false otherwise
    • containsOneNoneNull

      boolean containsOneNoneNull(Iterable<?> iterable)
      The time complexity of this method is O(n) if the given iterable contains n elements.
      Parameters:
      iterable - the searched Iterable, is considered to be empty when is null
      Returns:
      true if the given iterable contains exactly 1 non-null element, false otherwise
    • isEmpty

      boolean isEmpty(Iterable<?> iterable)
      The time complexity of this method is O(1).
      Parameters:
      iterable - the searched Iterable, is considered to be empty when is null
      Returns:
      true if the given iterable is empty, false otherwise