Details
-
Improvement
-
Status: Resolved
-
Trivial
-
Resolution: Fixed
-
None
-
None
-
Reviewed
Description
protected static boolean checkAndGetReversed(List<Filter> rowFilters, boolean defaultValue) { if (rowFilters.isEmpty()) { return defaultValue; } Boolean retValue = rowFilters.get(0).isReversed(); // this one boolean allEqual = rowFilters.stream().map(Filter::isReversed).allMatch(retValue::equals); if (!allEqual) { throw new IllegalArgumentException("Filters in the list must have the same reversed flag"); } return retValue; }