/** * Checks if {@code row} is covered by one of the exlusions * * @param row The object whose coverage is to be checked * @return The exclusion that covers {@code row}. null if no such exclusion exists */ public static Exclusion covered(Row row, List<Exclusion> exclusions) { if (exclusions == null) { return null; } for (Exclusion exclusion : exclusions) { if (row.isCovered(exclusion.getExclusion())) { return exclusion; } } return null; }