Package org.kiwiproject.beta.base
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 TypeMethodDescription<T> Set<T>checkElements(Class<T> expectedType, Set<T> set) Checks that elements in the set are of the expected type.
-
Method Details
-
checkElements
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 setset- 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
-