boolean (ErrorCategory category) { Condition<Integer> belongsToCategoryCondition = errorCode -> categoryCodeOf(errorCode) == category.getCode(); return ContainerUtil.exists(errors.keySet(), belongsToCategoryCondition) || ContainerUtil.exists(warnings.keySet(), belongsToCategoryCondition); }