Package org.jitterbit.util.string

Examples of org.jitterbit.util.string.StringMatcher


    }

    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


    public Predicate<String> getFilter() {
        String text = field.getText().trim();
        if (text.isEmpty()) {
            return Predicates.alwaysTrue();
        }
        StringMatcher matcher = contains.isSelected() ? StringMatcher.CONTAINS_IGNORE_CASE
                        : StringMatcher.STARTS_WITH_IGNORE_CASE;
        return new StringMatcherPredicate(matcher, text);
    }
View Full Code Here

    public Predicate<String> getFilter() {
        String s = getFilterString();
        if (s.isEmpty() && emptyStringMatchesAll) {
            return Predicates.alwaysTrue();
        }
        StringMatcher matcher = selectedOption.getMatcher();
        return new StringMatcherPredicate(matcher, s);
    }
View Full Code Here

            return false;
        }
        if (searchString.length() == 0 && emptyStringMatchesEverything) {
            return true;
        }
        StringMatcher matcher = rule.getMatcher();
        return matcher.matches(searchString, s);
    }
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

TOP

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

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.