public List<StringMatchLocation> match(final String string, final int limit) {
        return switch (matchType) {
            case ANY -> Collections.singletonList(new StringMatchLocation(0, string.length()));
            case NULL -> createZeroSingletonList(string == null);
            case NON_NULL -> createZeroSingletonList(string != null);
            case BLANK -> createZeroSingletonList(string != null && string.isBlank());
            case NON_BLANK -> createZeroSingletonList(string != null && !string.isBlank());
            case EMPTY -> createZeroSingletonList(string != null && string.isEmpty());
            case NON_EMPTY -> createZeroSingletonList(string != null && !string.isEmpty());
            case NULL_OR_BLANK -> createZeroSingletonList(NullSafe.isBlankString(string));
            case NULL_OR_EMPTY -> createZeroSingletonList(NullSafe.isEmptyString(string));
            case CONTAINS -> contains(string, limit);
            case EQUALS -> equals(string);
            case NOT_EQUALS -> notEquals(string);
            case STARTS_WITH -> startsWith(string);
            case ENDS_WITH -> endsWith(string);
            case REGEX -> regex(string, limit);
            case CHARS_ANYWHERE -> charsAnywhere(string, limit);
        };
    }
Types that will need the case of pattern to be normalised if caseSensitive is true.
stroom-index/stroom-index-lucene980/src/main/java/stroom/contentindex/StringMatcher.java