@Test public void testParseFields() { SearchEngineTextMatcherEditor.Field<String> blahField = new SearchEngineTextMatcherEditor.Field<>("blah", GlazedLists.toStringTextFilterator()); SearchEngineTextMatcherEditor.Field<String> burpField = new SearchEngineTextMatcherEditor.Field<>("burp", GlazedLists.toStringTextFilterator()); Set<SearchEngineTextMatcherEditor.Field<String>> fields = new HashSet<>(); fields.add(blahField); fields.add(burpField); SearchTerm[] terms = TextMatchers.parse("blah:burp"); assertEquals(1, terms.length); checkFilterTerm(terms[0], "blah:burp", false, false, null); terms = TextMatchers.parse("\"blah:stuff\"", fields); assertEquals(1, terms.length); checkFilterTerm(terms[0], "blah:stuff", false, false, null); terms = TextMatchers.parse("blah:burp", fields); assertEquals(1, terms.length); checkFilterTerm(terms[0], "burp", false, false, blahField); terms = TextMatchers.parse("blah:stuff burp:blech", fields); assertEquals(2, terms.length); checkFilterTerm(terms[0], "stuff", false, false, blahField); checkFilterTerm(terms[1], "blech", false, false, burpField); terms = TextMatchers.parse("blah: stuff burp: blech", fields); assertEquals(2, terms.length); checkFilterTerm(terms[0], "stuff", false, false, null); checkFilterTerm(terms[1], "blech", false, false, null); terms = TextMatchers.parse("blah:\" stuff burp: blech \"", fields); assertEquals(1, terms.length); checkFilterTerm(terms[0], " stuff burp: blech ", false, false, blahField); terms = TextMatchers.parse("blah:burp:blech", fields); assertEquals(1, terms.length); checkFilterTerm(terms[0], "burp:blech", false, false, blahField); terms = TextMatchers.parse("blah: burp:", fields); assertEquals(0, terms.length); }
public static <E> SearchTerm<E>[] parse(String text) { return parse(text, Collections.<SearchEngineTextMatcherEditor.Field<E>>emptySet()); }
TextMatchers { public static <E> SearchTerm<E>[] parse(String text) { return parse(text, Collections.<SearchEngineTextMatcherEditor.Field<E>>emptySet()); } }
TextMatchers { public static <E> SearchTerm<E>[] parse(String text) { return parse(text, Collections.<SearchEngineTextMatcherEditor.Field<E>>emptySet()); }  }
TextMatchers { public static <E> SearchTerm<E>[] parse(String text) { return parse(text, Collections.<SearchEngineTextMatcherEditor.Field<E>>emptySet()); }  static boolean matches(List<String> filterStrings, TextFilterator<? super E> filterator, SearchTerm<E>[] searchTerms, TextSearchStrategy[] filterStrategies, E element); static SearchTerm[] normalizeSearchTerms(SearchTerm[] filters, TextSearchStrategy.Factory strategy); static SearchTerm<E>[] parse(String text); static SearchTerm<E>[] parse(String text, Set<SearchEngineTextMatcherEditor.Field<E>> fields); static boolean isMatcherConstrained(TextMatcher oldMatcher, TextMatcher newMatcher); static boolean isMatcherRelaxed(TextMatcher oldMatcher, TextMatcher newMatcher); }
TextMatchers { public static <E> SearchTerm<E>[] parse(String text) { return parse(text, Collections.<SearchEngineTextMatcherEditor.Field<E>>emptySet()); }  static boolean matches(List<String> filterStrings, TextFilterator<? super E> filterator, SearchTerm<E>[] searchTerms, TextSearchStrategy[] filterStrategies, E element); static SearchTerm[] normalizeSearchTerms(SearchTerm[] filters, TextSearchStrategy.Factory strategy); static SearchTerm<E>[] parse(String text); static SearchTerm<E>[] parse(String text, Set<SearchEngineTextMatcherEditor.Field<E>> fields); static boolean isMatcherConstrained(TextMatcher oldMatcher, TextMatcher newMatcher); static boolean isMatcherRelaxed(TextMatcher oldMatcher, TextMatcher newMatcher);  }