Examples of StringMatcher


Examples of org.eclipse.wst.sse.ui.internal.filter.StringMatcher

  public void updatePattern(String pattern) {
    if (pattern.length() == 0) {
      fStringMatcher = null;
    }
    else {
      fStringMatcher = new StringMatcher(pattern, pattern.toLowerCase().equals(pattern), false);
    }
   
  }
View Full Code Here

Examples of org.erlide.ui.util.StringMatcher

     */
    void setMatcherString(final String pattern, final boolean update) {
        if (pattern.length() == 0) {
            fStringMatcher = null;
        } else {
            fStringMatcher = new StringMatcher(pattern, true, false);
        }
        // Update the name pattern filter on the tree viewer
        fNamePatternFilter.setStringMatcher(fStringMatcher);
        // Update the tree viewer according to the pattern
        if (update) {
View Full Code Here

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

Examples of org.jitterbit.util.string.StringMatcher

    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

Examples of org.jitterbit.util.string.StringMatcher

    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

Examples of org.jitterbit.util.string.StringMatcher

            return false;
        }
        if (searchString.length() == 0 && emptyStringMatchesEverything) {
            return true;
        }
        StringMatcher matcher = rule.getMatcher();
        return matcher.matches(searchString, s);
    }
View Full Code Here

Examples of org.jitterbit.util.string.StringMatcher

    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

Examples of org.jtester.hamcrest.matcher.string.StringMatcher

    super(str, IStringAssert.class);
    this.valueClaz = String.class;
  }

  public IStringAssert isEqualTo(String expected, StringMode... modes) {
    StringMatcher matcher = new StringEqualMatcher(expected);
    matcher.setStringModes(modes);
    return (IStringAssert) this.assertThat(matcher);
  }
View Full Code Here

Examples of org.jtester.hamcrest.matcher.string.StringMatcher

    Matcher _matcher = AnyOf.notAny(matchers);
    return this.assertThat(_matcher);
  }

  public IStringAssert eqIgnoreCase(String string) {
    StringMatcher matcher = new StringEqualMatcher(string);
    matcher.setStringModes(StringMode.IgnoreCase);
    return (IStringAssert) this.assertThat(matcher);
  }
View Full Code Here

Examples of org.jtester.hamcrest.matcher.string.StringMatcher

    matcher.setStringModes(StringMode.IgnoreCase);
    return (IStringAssert) this.assertThat(matcher);
  }

  public IStringAssert eqWithStripSpace(String string) {
    StringMatcher matcher = new StringEqualMatcher(string);
    matcher.setStringModes(StringMode.SameAsSpace);
    return (IStringAssert) this.assertThat(matcher);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.