Package org.jitterbit.util.string

Examples of org.jitterbit.util.string.StringMatcherPredicate


    private static class Filter extends SelectorTableStringFilter<CROM> {

        private static final StringMatcher MATCHER = new WildcardStringMatcher(false);

        public Filter(String filterString) {
            super(new StringMatcherPredicate(MATCHER, filterString), true);
        }
View Full Code Here


        this.type = type;
        hasWildcard = Wildcards.hasWildcard(pattern);
        if (hasWildcard) {
            matcher = Wildcards.isAnyLevel(pattern) ? null : Wildcards.parse(pattern);
        } else {
            matcher = new StringMatcherPredicate(StringMatcher.EQUALS_IGNORE_CASE, pattern);
        }
    }
View Full Code Here

        Runnable job = new Runnable() {

            @Override
            public void run() {
                String filterString = field.getText().trim();
                Predicate<String> filter = new StringMatcherPredicate(matcher, filterString);
                browser.setNameFilter(filter);
            }
        };
        DelayedDocumentContentChangeReaction r = new DelayedDocumentContentChangeReaction(job);
        r.install(field);
View Full Code Here

        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

        String s = getFilterString();
        if (s.isEmpty() && emptyStringMatchesAll) {
            return Predicates.alwaysTrue();
        }
        StringMatcher matcher = selectedOption.getMatcher();
        return new StringMatcherPredicate(matcher, s);
    }
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 static class Filter extends SelectorTableStringFilter<CROM> {

        private static final StringMatcher MATCHER = new WildcardStringMatcher(false);

        public Filter(String filterString) {
            super(new StringMatcherPredicate(MATCHER, filterString), true);
        }
View Full Code Here

        }

        private Set<IntegrationEntity> collectItemsWithMatchingNames(IntegrationProject project, String filterString) {
            KSet<IntegrationEntity> items = KSet.hash();
            items.addAll(project.getAllEntities());
            Predicate<String> condition = new StringMatcherPredicate(StringMatcher.CONTAINS_IGNORE_CASE, filterString.trim());
            EntityFilter filter = EntityFilters.nameFilter(condition);
            items.keepAll(filter);
            return items;
        }
View Full Code Here

     *            a <code>StringMatcher</code> defining the search rule
     * @param filterString
     *            the filter string to apply to each leaf node
     */
    public LeafDisplayNameFilter(StringMatcher matcher, String filterString) {
        condition = new StringMatcherPredicate(matcher, filterString);
    }
View Full Code Here

TOP

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

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.