Searched refs:matcher (Results 1 - 25 of 274) sorted by relevance

1234567891011

/external/proguard/src/proguard/util/
H A DNotMatcher.java31 private final StringMatcher matcher; field in class:NotMatcher
34 public NotMatcher(StringMatcher matcher) argument
36 this.matcher = matcher;
44 return !matcher.matches(string);
H A DSettableMatcher.java31 private StringMatcher matcher; field in class:SettableMatcher
34 public void setMatcher(StringMatcher matcher) argument
36 this.matcher = matcher;
44 return matcher.matches(string);
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/
H A DLocaleMatcherTest.java31 LocaleMatcher matcher = new LocaleMatcher("zh_CN, zh_TW, iw");
34 assertEquals("zh_CN, zh_TW, iw;", taiwanChinese, matcher.getBestMatch("zh_Hant_TW"));
35 assertEquals("zh_CN, zh_TW, iw;", taiwanChinese, matcher.getBestMatch("zh_Hant"));
36 assertEquals("zh_CN, zh_TW, iw;", taiwanChinese, matcher.getBestMatch("zh_TW"));
37 assertEquals("zh_CN, zh_TW, iw;", chinaChinese, matcher.getBestMatch("zh_Hans_CN"));
38 assertEquals("zh_CN, zh_TW, iw;", chinaChinese, matcher.getBestMatch("zh_CN"));
39 assertEquals("zh_CN, zh_TW, iw;", chinaChinese, matcher.getBestMatch("zh"));
40 assertEquals("zh_CN, zh_TW, iw;", taiwanChinese, matcher.getBestMatch("zh_Hant_HK"));
44 final LocaleMatcher matcher = new LocaleMatcher("fr, en, en_GB, es_MX, es_419, es");
45 assertEquals("en_GB", matcher
304 showDistance(LocaleMatcher matcher, String desired, String supported) argument
[all...]
/external/apache-http/src/org/apache/http/protocol/
H A DHttpRequestHandlerRegistry.java58 private final UriPatternMatcher matcher; field in class:HttpRequestHandlerRegistry
61 matcher = new UriPatternMatcher();
65 matcher.register(pattern, handler);
69 matcher.unregister(pattern);
73 matcher.setHandlers(map);
77 return (HttpRequestHandler) matcher.lookup(requestURI);
85 return matcher.matchUriRequestPattern(pattern, requestUri);
/external/hamcrest/src/org/hamcrest/core/
H A DIs.java19 private final Matcher<T> matcher; field in class:Is
21 public Is(Matcher<T> matcher) { argument
22 this.matcher = matcher;
26 return matcher.matches(arg);
30 description.appendText("is ").appendDescriptionOf(matcher);
41 public static <T> Matcher<T> is(Matcher<T> matcher) { argument
42 return new Is<T>(matcher);
H A DIsNot.java13 * Calculates the logical negation of a matcher.
16 private final Matcher<T> matcher; field in class:IsNot
18 public IsNot(Matcher<T> matcher) { argument
19 this.matcher = matcher;
23 return !matcher.matches(arg);
27 description.appendText("not ").appendDescriptionOf(matcher);
34 public static <T> Matcher<T> not(Matcher<T> matcher) { argument
35 return new IsNot<T>(matcher);
H A DDescribedAs.java13 * Provides a custom description to another matcher.
17 private final Matcher<T> matcher; field in class:DescribedAs
22 public DescribedAs(String descriptionTemplate, Matcher<T> matcher, Object[] values) { argument
24 this.matcher = matcher;
29 return matcher.matches(o);
33 java.util.regex.Matcher arg = ARG_PATTERN.matcher(descriptionTemplate);
49 * Wraps an existing matcher and overrides the description when it fails.
52 public static <T> Matcher<T> describedAs(String description, Matcher<T> matcher, Object... values) { argument
53 return new DescribedAs<T>(description, matcher, value
[all...]
/external/hamcrest/integration/src/org/hamcrest/
H A DMatcherAssert.java7 public static <T> void assertThat(T actual, Matcher<T> matcher) { argument
8 assertThat("", actual, matcher);
11 public static <T> void assertThat(String reason, T actual, Matcher<T> matcher) { argument
12 if (!matcher.matches(actual)) {
16 .appendDescriptionOf(matcher)
/external/guava/guava-tests/test/com/google/common/base/
H A DCharMatcherTest.java133 private void doTestSetBits(CharMatcher matcher) { argument
135 matcher.setBits(bitset);
137 assertEquals(matcher.matches((char) i), bitset.get(i));
170 private void doTestEmpty(CharMatcher matcher) throws Exception { argument
171 reallyTestEmpty(matcher);
172 reallyTestEmpty(matcher.negate());
173 reallyTestEmpty(matcher.precomputed());
176 private void reallyTestEmpty(CharMatcher matcher) throws Exception { argument
177 assertEquals(-1, matcher.indexIn(""));
178 assertEquals(-1, matcher
201 doTestNull(CharMatcher matcher) argument
224 doTestNoMatches(CharMatcher matcher, String s) argument
251 doTestAllMatches(CharMatcher matcher, String s) argument
262 reallyTestNoMatches(CharMatcher matcher, CharSequence s) argument
290 reallyTestAllMatches(CharMatcher matcher, CharSequence s) argument
319 doTestGeneral(CharMatcher matcher, char match, char noMatch) argument
326 doTestOneCharMatch(CharMatcher matcher, String s) argument
334 doTestOneCharNoMatch(CharMatcher matcher, String s) argument
342 doTestMatchThenNoMatch(CharMatcher matcher, String s) argument
350 doTestNoMatchThenMatch(CharMatcher matcher, String s) argument
358 reallyTestOneCharMatch(CharMatcher matcher, String s) argument
375 reallyTestOneCharNoMatch(CharMatcher matcher, String s) argument
393 reallyTestMatchThenNoMatch(CharMatcher matcher, String s) argument
409 reallyTestNoMatchThenMatch(CharMatcher matcher, String s) argument
760 assertToStringWorks(String expected, CharMatcher matcher) argument
[all...]
/external/guava/guava-gwt/test-super/com/google/common/base/super/com/google/common/base/
H A DCharMatcherTest.java107 private void doTestEmpty(CharMatcher matcher) throws Exception { argument
108 reallyTestEmpty(matcher);
109 reallyTestEmpty(matcher.negate());
110 reallyTestEmpty(matcher.precomputed());
113 private void reallyTestEmpty(CharMatcher matcher) throws Exception { argument
114 assertEquals(-1, matcher.indexIn(""));
115 assertEquals(-1, matcher.indexIn("", 0));
117 matcher.indexIn("", 1);
122 matcher.indexIn("", -1);
126 assertEquals(-1, matcher
155 doTestNoMatches(CharMatcher matcher, String s) argument
182 doTestAllMatches(CharMatcher matcher, String s) argument
193 reallyTestNoMatches(CharMatcher matcher, CharSequence s) argument
221 reallyTestAllMatches(CharMatcher matcher, CharSequence s) argument
250 doTestGeneral(CharMatcher matcher, char match, char noMatch) argument
257 doTestOneCharMatch(CharMatcher matcher, String s) argument
265 doTestOneCharNoMatch(CharMatcher matcher, String s) argument
273 doTestMatchThenNoMatch(CharMatcher matcher, String s) argument
281 doTestNoMatchThenMatch(CharMatcher matcher, String s) argument
289 reallyTestOneCharMatch(CharMatcher matcher, String s) argument
306 reallyTestOneCharNoMatch(CharMatcher matcher, String s) argument
324 reallyTestMatchThenNoMatch(CharMatcher matcher, String s) argument
340 reallyTestNoMatchThenMatch(CharMatcher matcher, String s) argument
642 assertToStringWorks(String expected, CharMatcher matcher) argument
[all...]
/external/junit/src/org/junit/internal/matchers/
H A DCombinableMatcher.java13 public CombinableMatcher(Matcher<? extends T> matcher) { argument
14 fMatcher= matcher;
26 public CombinableMatcher<T> and(Matcher<? extends T> matcher) { argument
27 return new CombinableMatcher<T>(allOf(matcher, fMatcher));
31 public CombinableMatcher<T> or(Matcher<? extends T> matcher) { argument
32 return new CombinableMatcher<T>(anyOf(matcher, fMatcher));
/external/easymock/src/org/easymock/internal/
H A DILegacyMatcherMethods.java23 void setDefaultMatcher(org.easymock.ArgumentsMatcher matcher); argument
26 void setMatcher(Method method, org.easymock.ArgumentsMatcher matcher); argument
H A DExpectedInvocation.java34 private final org.easymock.ArgumentsMatcher matcher; field in class:ExpectedInvocation
45 org.easymock.ArgumentsMatcher matcher) {
47 this.matcher = matcher;
48 this.matchers = (matcher == null) ? createMissingMatchers(invocation,
77 && ((this.matcher == null && other.matcher == null) || (this.matcher != null && this.matcher
78 .equals(other.matcher)))
43 ExpectedInvocation(Invocation invocation, List<IArgumentMatcher> matchers, @SuppressWarnings(�) org.easymock.ArgumentsMatcher matcher) argument
131 withMatcher(@uppressWarnings�) org.easymock.ArgumentsMatcher matcher) argument
[all...]
/external/robolectric/src/test/java/com/xtremelabs/robolectric/shadows/
H A DUriMatcherTest.java22 UriMatcher matcher; field in class:UriMatcherTest
28 matcher = new UriMatcher(NO_MATCH);
29 root = Robolectric.shadowOf(matcher).rootNode;
43 matcher.addURI(AUTH, path, 1);
57 matcher.addURI(AUTH, "#", 1);
58 matcher.addURI(AUTH, "*", 2);
66 matcher.addURI(AUTH, "bar", 1);
67 assertThat(matcher.match(Uri.withAppendedPath(URI, "bar")), is(1));
69 matcher.addURI(AUTH, "bar/#", 2);
70 assertThat(matcher
[all...]
/external/apache-http/src/org/apache/http/conn/util/
H A DInetAddressUtils.java62 return IPV4_PATTERN.matcher(input).matches();
66 return IPV6_STD_PATTERN.matcher(input).matches();
70 return IPV6_HEX_COMPRESSED_PATTERN.matcher(input).matches();
/external/ltrace/
H A Dfilter.c50 struct filter_lib_matcher *matcher,
54 rule->lib_matcher = matcher;
76 filter_lib_matcher_name_init(struct filter_lib_matcher *matcher, argument
87 matcher->type = type;
88 matcher->libname_re = libname_re;
93 filter_lib_matcher_main_init(struct filter_lib_matcher *matcher) argument
95 matcher->type = FLM_MAIN;
99 filter_lib_matcher_destroy(struct filter_lib_matcher *matcher) argument
101 switch (matcher->type) {
104 regfree(&matcher
49 filter_rule_init(struct filter_rule *rule, enum filter_rule_type type, struct filter_lib_matcher *matcher, regex_t symbol_re) argument
128 matcher_matches_library(struct filter_lib_matcher *matcher, struct library *lib) argument
[all...]
H A Dfilter.h68 struct filter_lib_matcher *matcher,
76 /* Create a matcher that matches library name. RE is owned and
79 void filter_lib_matcher_name_init(struct filter_lib_matcher *matcher,
83 /* Create a matcher that matches main binary. */
84 void filter_lib_matcher_main_init(struct filter_lib_matcher *matcher);
86 void filter_lib_matcher_destroy(struct filter_lib_matcher *matcher);
/external/junit/src/org/junit/rules/
H A DExpectedException.java65 * Adds {@code matcher} to the list of requirements for any thrown exception.
69 public void expect(Matcher<?> matcher) { argument
71 fMatcher= (Matcher<Object>) matcher;
73 fMatcher= both(fMatcher).and(matcher);
93 * Adds {@code matcher} to the list of requirements for the message
96 public void expectMessage(Matcher<String> matcher) { argument
97 expect(hasMessage(matcher));
123 private Matcher<Throwable> hasMessage(final Matcher<String> matcher) { argument
127 description.appendDescriptionOf(matcher);
132 return matcher
[all...]
/external/slf4j/slf4j-migrator/src/main/java/org/slf4j/migrator/line/
H A DLineConverter.java54 Matcher matcher;
60 matcher = pattern.matcher(text);
61 if (matcher.find()) {
64 String replacementText = conversionRule.replace(matcher);
65 text = matcher.replaceAll(replacementText);
H A DMultiGroupConversionRule.java80 public String replace(Matcher matcher) { argument
84 for (int group = 1; group <= matcher.groupCount(); group++) {
88 // + matcher.group(group) + " with " + replacementText);
91 replacementBuffer.append(matcher.group(group));
/external/slf4j/slf4j-migrator/src/test/java/org/slf4j/migrator/
H A DAternativeApproach.java47 Matcher m = pat.matcher(s);
64 Matcher m = pat.matcher(s);
70 m = pat.matcher(s1);
76 m = pat.matcher(s2);
80 m = pat.matcher(s3);
92 Matcher m = pat.matcher(s);
98 pat.matcher(nonMatching);
109 Matcher m = pat.matcher(s);
115 m = pat.matcher(s2);
119 m = pat.matcher(s
[all...]
/external/icu/icu4c/source/i18n/
H A Dquant.cpp27 matcher = adoptedMatcher;
35 matcher(o.matcher->clone()),
42 delete matcher;
71 UMatchDegree m = matcher->toMatcher()->matches(text, offset, limit, incremental);
101 matcher->toMatcher()->toPattern(result, escapeUnprintable);
126 return (minCount == 0) || matcher->toMatcher()->matchesIndexValue(v);
134 matcher->toMatcher()->addMatchSetTo(toUnionTo);
142 matcher->setData(d);
/external/mockito/src/org/mockito/
H A DMatchers.java24 * //stubbing using anyInt() argument matcher
30 * //you can also verify using argument matcher
42 * //above is correct - eq() is also an argument matcher
45 * //above is incorrect - exception will be thrown because third argument is given without argument matcher.
49 * Internally, they record a matcher on a stack and return a dummy value (usually null).
64 * Before you start implementing your own custom argument matcher, make sure you check out {@link ArgumentCaptor} api.
66 * So, how to implement your own argument matcher?
67 * First, you might want to subclass {@link ArgumentMatcher} which is an hamcrest matcher with predefined describeTo() method.
100 * Also, <b>sometimes {@link ArgumentCaptor} may be a better fit</b> than custom matcher.
101 * For example, if custom argument matcher i
777 argThat(Matcher<T> matcher) argument
789 charThat(Matcher<Character> matcher) argument
801 booleanThat(Matcher<Boolean> matcher) argument
813 byteThat(Matcher<Byte> matcher) argument
825 shortThat(Matcher<Short> matcher) argument
837 intThat(Matcher<Integer> matcher) argument
849 longThat(Matcher<Long> matcher) argument
861 floatThat(Matcher<Float> matcher) argument
873 doubleThat(Matcher<Double> matcher) argument
877 reportMatcher(Matcher<?> matcher) argument
[all...]
/external/junit/src/org/junit/
H A DAssume.java51 * Call to assume that <code>actual</code> satisfies the condition specified by <code>matcher</code>.
61 * @param <T> the static type accepted by the matcher (this can flag obvious compile-time problems such as {@code assumeThat(1, is("a"))}
63 * @param matcher an expression, built of {@link Matcher}s, specifying allowed values
68 public static <T> void assumeThat(T actual, Matcher<T> matcher) { argument
69 if (!matcher.matches(actual))
70 throw new AssumptionViolatedException(actual, matcher);
/external/smali/util/src/main/java/org/jf/util/
H A DTextUtils.java56 Matcher matcher = pattern.matcher(source);
57 return matcher.replaceAll("\n");

Completed in 557 milliseconds

1234567891011