Class RegexPredicate

  • All Implemented Interfaces:
    ArgumentPredicate<java.lang.String>

    public class RegexPredicate
    extends java.lang.Object
    implements ArgumentPredicate<java.lang.String>
    A regex validation predicate that is true when the input does not match the specified regex
    • Constructor Summary

      Constructors 
      Constructor Description
      RegexPredicate​(java.lang.String regex)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.function.Predicate<java.lang.String> getPredicate()  
      static RegexPredicate notValidFor​(java.lang.String regex)
      Constructs an instance of the class statically
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RegexPredicate

        public RegexPredicate​(java.lang.String regex)
    • Method Detail

      • getPredicate

        public java.util.function.Predicate<java.lang.String> getPredicate()
        Specified by:
        getPredicate in interface ArgumentPredicate<java.lang.String>
      • notValidFor

        public static RegexPredicate notValidFor​(java.lang.String regex)
        Constructs an instance of the class statically
        Parameters:
        regex - the regex
        Returns:
        the instance