@Test public void testMatchString() { assertThat(matchString(Optional.empty(), "fooBar")).isTrue(); assertThat(matchString(Optional.of(Pattern.compile("\\w+")), "fooBar")).isTrue(); assertThat(matchString(Optional.of(Pattern.compile("\\d+")), "fooBar")).isFalse(); }
static boolean matchString(final Optional<Pattern> pattern, final String string) { return pattern.map(p -> p.matcher(string).matches()) .orElse(true); }
CouplingFilterUtils { static boolean matchString(final Optional<Pattern> pattern, final String string) { return pattern.map(p -> p.matcher(string).matches()) .orElse(true); } }
CouplingFilterUtils { static boolean matchString(final Optional<Pattern> pattern, final String string) { return pattern.map(p -> p.matcher(string).matches()) .orElse(true); } private  CouplingFilterUtils(); }
CouplingFilterUtils { static boolean matchString(final Optional<Pattern> pattern, final String string) { return pattern.map(p -> p.matcher(string).matches()) .orElse(true); } private  CouplingFilterUtils(); static boolean filterMethodCoupling(final CouplingFilterConfig couplingFilterConfig,
                                               final MethodCoupling coupling); }
CouplingFilterUtils { static boolean matchString(final Optional<Pattern> pattern, final String string) { return pattern.map(p -> p.matcher(string).matches()) .orElse(true); } private  CouplingFilterUtils(); static boolean filterMethodCoupling(final CouplingFilterConfig couplingFilterConfig,
                                               final MethodCoupling coupling);  }