@Override public CommonPattern compile(String pattern) { return new JdkPattern(Pattern.compile(pattern)); }
@Override public CommonPattern compile(String pattern) { return new JdkPattern(Pattern.compile(pattern)); } }
/** * Returns a predicate that evaluates to {@code true} if the {@code CharSequence} being tested * contains any match for the given regular expression pattern. The test used is equivalent to * {@code pattern.matcher(arg).find()} * * @since 3.0 */ @GwtIncompatible(value = "java.util.regex.Pattern") public static Predicate<CharSequence> contains(Pattern pattern) { return new ContainsPatternPredicate(new JdkPattern(pattern)); }
/** * Returns a splitter that considers any subsequence matching {@code pattern} to be a separator. * For example, {@code Splitter.on(Pattern.compile("\r?\n")).split(entireFile)} splits a string * into lines whether it uses DOS-style or UNIX-style line terminators. * * @param separatorPattern the pattern that determines whether a subsequence is a separator. This * pattern may not match the empty string. * @return a splitter, with default settings, that uses this pattern * @throws IllegalArgumentException if {@code separatorPattern} matches the empty string */ @GwtIncompatible // java.util.regex public static Splitter on(Pattern separatorPattern) { return on(new JdkPattern(separatorPattern)); }
@Override public CommonPattern compile(String pattern) { return new JdkPattern(Pattern.compile(pattern)); } }
/** * Returns a predicate that evaluates to {@code true} if the {@code CharSequence} being tested * contains any match for the given regular expression pattern. The test used is equivalent to * {@code pattern.matcher(arg).find()} * * @since 3.0 */ @GwtIncompatible(value = "java.util.regex.Pattern") public static Predicate<CharSequence> contains(Pattern pattern) { return new ContainsPatternPredicate(new JdkPattern(pattern)); }
/** * Returns a splitter that considers any subsequence matching {@code pattern} to be a separator. * For example, {@code Splitter.on(Pattern.compile("\r?\n")).split(entireFile)} splits a string * into lines whether it uses DOS-style or UNIX-style line terminators. * * @param separatorPattern the pattern that determines whether a subsequence is a separator. This * pattern may not match the empty string. * @return a splitter, with default settings, that uses this pattern * @throws IllegalArgumentException if {@code separatorPattern} matches the empty string */ @GwtIncompatible // java.util.regex public static Splitter on(Pattern separatorPattern) { return on(new JdkPattern(separatorPattern)); }
/** * Returns a predicate that evaluates to {@code true} if the {@code CharSequence} being tested * contains any match for the given regular expression pattern. The test used is equivalent to * {@code pattern.matcher(arg).find()} * * @since 3.0 */ @GwtIncompatible(value = "java.util.regex.Pattern") public static Predicate<CharSequence> contains(Pattern pattern) { return new ContainsPatternPredicate(new JdkPattern(pattern)); }
/** * Returns a splitter that considers any subsequence matching {@code pattern} to be a separator. * For example, {@code Splitter.on(Pattern.compile("\r?\n")).split(entireFile)} splits a string * into lines whether it uses DOS-style or UNIX-style line terminators. * * @param separatorPattern the pattern that determines whether a subsequence is a separator. This * pattern may not match the empty string. * @return a splitter, with default settings, that uses this pattern * @throws IllegalArgumentException if {@code separatorPattern} matches the empty string */ @GwtIncompatible // java.util.regex public static Splitter on(Pattern separatorPattern) { return on(new JdkPattern(separatorPattern)); }
@Override public CommonPattern compile(String pattern) { return new JdkPattern(Pattern.compile(pattern)); } }
@Override public CommonPattern compile(String pattern) { return new JdkPattern(Pattern.compile(pattern)); }
/** * Returns a predicate that evaluates to {@code true} if the {@code CharSequence} being tested * contains any match for the given regular expression pattern. The test used is equivalent to * {@code pattern.matcher(arg).find()} * * @since 3.0 */ @GwtIncompatible(value = "java.util.regex.Pattern") public static Predicate<CharSequence> contains(Pattern pattern) { return new ContainsPatternPredicate(new JdkPattern(pattern)); }
/** * Returns a predicate that evaluates to {@code true} if the {@code CharSequence} being tested * contains any match for the given regular expression pattern. The test used is equivalent to * {@code pattern.matcher(arg).find()} * * @since 3.0 */ @GwtIncompatible(value = "java.util.regex.Pattern") public static Predicate<CharSequence> contains(Pattern pattern) { return new ContainsPatternPredicate(new JdkPattern(pattern)); }
/** * Returns a splitter that considers any subsequence matching {@code pattern} to be a separator. * For example, {@code Splitter.on(Pattern.compile("\r?\n")).split(entireFile)} splits a string * into lines whether it uses DOS-style or UNIX-style line terminators. * * @param separatorPattern the pattern that determines whether a subsequence is a separator. This * pattern may not match the empty string. * @return a splitter, with default settings, that uses this pattern * @throws IllegalArgumentException if {@code separatorPattern} matches the empty string */ @GwtIncompatible // java.util.regex public static Splitter on(Pattern separatorPattern) { return on(new JdkPattern(separatorPattern)); }
/** * Returns a splitter that considers any subsequence matching {@code pattern} to be a separator. * For example, {@code Splitter.on(Pattern.compile("\r?\n")).split(entireFile)} splits a string * into lines whether it uses DOS-style or UNIX-style line terminators. * * @param separatorPattern the pattern that determines whether a subsequence is a separator. This * pattern may not match the empty string. * @return a splitter, with default settings, that uses this pattern * @throws IllegalArgumentException if {@code separatorPattern} matches the empty string */ @GwtIncompatible // java.util.regex public static Splitter on(Pattern separatorPattern) { return on(new JdkPattern(separatorPattern)); }