Interface KiwiCasts2.SetCheckStrategy

All Known Implementing Classes:
KiwiCasts2.DefaultSetCheckStrategy, KiwiCasts2.StandardSetCheckStrategy
Enclosing class:
KiwiCasts2

public static interface KiwiCasts2.SetCheckStrategy
Strategy interface for checking elements in a set.
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> Set<T>
    checkElements(Class<T> expectedType, Set<T> set)
    Checks that elements in the set are of the expected type.
  • Method Details

    • checkElements

      <T> Set<T> checkElements(Class<T> expectedType, Set<T> set) throws TypeMismatchException
      Checks that elements in the set are of the expected type.
      Type Parameters:
      T - the expected element type
      Parameters:
      expectedType - the expected type of elements in the set
      set - the set to check
      Returns:
      the original set if all elements match the expected type
      Throws:
      TypeMismatchException - if an element is found with an incompatible type