/** * Returns whether any of the given column names begin with the given prefix, according to the list of column name * matchers. * * @param columnNames the column names to search * @param prefix the prefix to search for * @param columnNameMatchers list of column name matchers * @return whether any of the column names begin with the prefix * @since 3.5.0 */ public static boolean anyColumnsStartWithPrefix(Collection<String> columnNames, String prefix, List<ColumnNameMatcher> columnNameMatchers) { return columnNames.stream().anyMatch( columnName -> columnNameMatchers.stream().anyMatch( matcher -> matcher.columnNameStartsWith(columnName, prefix))); } }