Class RegexPredicate
- java.lang.Object
-
- me.s3ns3iw00.jcommands.argument.validator.type.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
-
-
-
Method Detail
-
getPredicate
public java.util.function.Predicate<java.lang.String> getPredicate()
- Specified by:
getPredicate
in interfaceArgumentPredicate<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
-
-