public static Predicate<String> createWildCardedFilterPredicate(final String filter,
                                                                    final boolean isCompleteMatch,
                                                                    final boolean isCaseSensitive) {
        Objects.requireNonNull(filter, "filter not supplied");
        if (filter.isEmpty()) {
            return str -> false;
        } else if (PatternUtil.containsWildCards(filter)) {
            final Pattern pattern = PatternUtil.createPatternFromWildCardFilter(
                    filter, isCompleteMatch, isCaseSensitive);
            return isCompleteMatch
                    ? pattern.asMatchPredicate()
                    : pattern.asPredicate();
        } else {
            if (isCompleteMatch) {
                return isCaseSensitive
                        ? filter::equals
                        : filter::equalsIgnoreCase;
            } else {
                return isCaseSensitive
                        ? PredicateUtil.caseSensitiveContainsPredicate(filter)
                        : PredicateUtil.caseInsensitiveContainsPredicate(filter);
            }
        }
    }
Creates a {@link Predicate<String>} for matching values using the supplied filter {@link String}
stroom-util/src/main/java/stroom/util/PredicateUtil.java