Package org.jitterbit.util.string

Examples of org.jitterbit.util.string.WildcardStringMatcher


    }

    private JComponent createFilterField(Border border) {
        // HACK: The StringMatcher is identical to the ones
        // we use in TreeFilters. Move to a common place.
        StringMatcher matcher = new WildcardStringMatcher(false);
        String description = "* = any string, ? = any character";
        BrowserFilterField field = new BrowserFilterField(browser, matcher, description);
        JComponent ui = field.getUi();
        ui.setBorder(border);
        return ui;
View Full Code Here


    private static final class Filter implements ListFilter {

        private final Predicate<String> impl;

        public Filter(final String text) {
            final StringMatcher matcher = new WildcardStringMatcher(false);
            impl = new Predicate<String>() {

                @Override
                public boolean apply(String title) {
                    return matcher.matches(text, title);
                }
            };
        }
View Full Code Here

        private static Predicate<String> getMatcher(String part, boolean exactMatchIfEndsWithSpace) {
            if (StringUtils.isBlank(part)) {
                return Predicates.alwaysTrue();
            }
            if (part.contains("*")) {
                return new StringMatcherPredicate(new WildcardStringMatcher(false), part);
            }
            if (part.endsWith(" ") && exactMatchIfEndsWithSpace) {
                return new StringMatcherPredicate(StringMatcher.EQUALS_IGNORE_CASE , part.trim());
            }
            return new StringMatcherPredicate(StringMatcher.STARTS_WITH_IGNORE_CASE , part);
View Full Code Here

    private final StringMatcher matcher;

    private final boolean memoize;

    public LeafDisplayNameFilterFunction() {
        this(new WildcardStringMatcher(false), false);
    }
View Full Code Here

TOP

Related Classes of org.jitterbit.util.string.WildcardStringMatcher

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.