Class RegexMatcher

  • All Implemented Interfaces:
    org.hamcrest.Matcher, org.hamcrest.SelfDescribing

    public class RegexMatcher
    extends org.hamcrest.TypeSafeMatcher
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.regex.Pattern pattern  
    • Constructor Summary

      Constructors 
      Constructor Description
      RegexMatcher​(java.lang.String pattern)  
      RegexMatcher​(java.util.regex.Pattern pattern)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void describeTo​(org.hamcrest.Description description)  
      static RegexMatcher matchesPattern​(java.lang.String pattern)  
      static RegexMatcher matchesPattern​(java.util.regex.Pattern pattern)  
      protected boolean matchesSafely​(java.lang.Object item)  
      • Methods inherited from class org.hamcrest.TypeSafeMatcher

        describeMismatch, describeMismatchSafely, matches
      • Methods inherited from class org.hamcrest.BaseMatcher

        _dont_implement_Matcher___instead_extend_BaseMatcher_, isNotNull, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • pattern

        private final java.util.regex.Pattern pattern
    • Constructor Detail

      • RegexMatcher

        public RegexMatcher​(java.lang.String pattern)
      • RegexMatcher

        public RegexMatcher​(java.util.regex.Pattern pattern)
    • Method Detail

      • describeTo

        public void describeTo​(org.hamcrest.Description description)
      • matchesSafely

        protected boolean matchesSafely​(java.lang.Object item)
        Specified by:
        matchesSafely in class org.hamcrest.TypeSafeMatcher
      • matchesPattern

        public static RegexMatcher matchesPattern​(java.util.regex.Pattern pattern)
      • matchesPattern

        public static RegexMatcher matchesPattern​(java.lang.String pattern)