/** * Determines if the given entity has validation warnings. * * @param entity the entity to check * @return <tt>true</tt> if there are validation warnings, <tt>false</tt> otherwise */ public boolean hasValidationWarnings(Object entity) { for (BiConsumer<Object, Consumer<String>> validator : validateHandlers) { ValueHolder<Boolean> hasWarnings = ValueHolder.of(false); validator.accept(entity, warning -> hasWarnings.accept(true)); if (hasWarnings.get()) { return true; } } return false; }