edu.umd.cs.findbugs.util

Class RegexStringMatcher

  • All Implemented Interfaces:
    StringMatcher


    public class RegexStringMatcher
    extends Object
    implements StringMatcher
    StringMatcher that matches based on a regular expression.
    Author:
    David Hovemeyer
    • Constructor Detail

      • RegexStringMatcher

        public RegexStringMatcher(String patStr)
        Constructor.
        Parameters:
        patStr - a String defining the regular expression pattern to match
    • Method Detail

      • matches

        public boolean matches(String s)
        Description copied from interface: StringMatcher
        Return whether or not the given String matches.
        Specified by:
        matches in interface StringMatcher
        Parameters:
        s - a String
        Returns:
        true if the String matches, false if it does not match

Copyright © 2003–2015. All rights reserved.