-
public class Matchers
-
-
Field Summary
Fields Modifier and Type Field Description private final RegexHEXADECIMALprivate final RegexIP_ADDRESSprivate final RegexUUID_REGEXpublic final static MatchersINSTANCE
-
Method Summary
Modifier and Type Method Description final static Matcherregexp(Pattern re, String value)Match a regular expression final static Matcherregexp(Pattern re)Match a regular expression final static Matcherregexp(String regexp, String value)Match a regular expression final static Matcherregexp(String regexp)Match a regular expression final static MatcherhexValue(String value)Match a hexadecimal value final static MatcherhexValue()Match a hexadecimal value final static Matcheridentifier(Object value)Match a numeric identifier (integer) final static Matcheridentifier()Match a numeric identifier (integer) final static MatcheripAddress(String value)Match an IP Address final static MatcheripAddress()Match an IP Address final static Matchernumeric(Number value)Match a numeric value final static Matchernumeric()Match a numeric value final static Matcherdecimal(Number value)Match a decimal value final static Matcherdecimal()Match a decimal value final static Matcherinteger(Long value)Match an integer value final static Matcherinteger()Match an integer value final static Matchertimestamp(String pattern, String value)Match a timestamp final static Matchertimestamp(String pattern)Match a timestamp final static Matchertimestamp()Match a timestamp final static Matchertime(String pattern, String value)Match a time final static Matchertime(String pattern)Match a time final static Matchertime()Match a time final static Matcherdate(String pattern, String value)Match a date final static Matcherdate(String pattern)Match a date final static Matcherdate()Match a date final static Matcheruuid(String value)Match a universally unique identifier (UUID) final static Matcheruuid()Match a universally unique identifier (UUID) final static Matcherstring(String value)Match any string value final static Matcherstring()Match any string value final static Matcherbool(Boolean value)Match any boolean final static Matcherbool()Match any boolean final static MatcherequalTo(Object value)Match Equality final static MatcherincludesStr(String value)Matches if the string is included in the value final static MatchernullValue()Matches a null value final RegexgetHEXADECIMAL()final RegexgetIP_ADDRESS()final RegexgetUUID_REGEX()-
-
Method Detail
-
regexp
@JvmOverloads() final static Matcher regexp(Pattern re, String value)
Match a regular expression
- Parameters:
re- Regular expression patternvalue- Example value, if not provided a random one will be generated
-
regexp
@JvmOverloads() final static Matcher regexp(Pattern re)
Match a regular expression
- Parameters:
re- Regular expression pattern
-
regexp
@JvmOverloads() final static Matcher regexp(String regexp, String value)
Match a regular expression
- Parameters:
value- Example value, if not provided a random one will be generated
-
regexp
@JvmOverloads() final static Matcher regexp(String regexp)
Match a regular expression
-
hexValue
@JvmOverloads() final static Matcher hexValue(String value)
Match a hexadecimal value
- Parameters:
value- Example value, if not provided a random one will be generated
-
hexValue
@JvmOverloads() final static Matcher hexValue()
Match a hexadecimal value
-
identifier
@JvmOverloads() final static Matcher identifier(Object value)
Match a numeric identifier (integer)
- Parameters:
value- Example value, if not provided a random one will be generated
-
identifier
@JvmOverloads() final static Matcher identifier()
Match a numeric identifier (integer)
-
ipAddress
@JvmOverloads() final static Matcher ipAddress(String value)
Match an IP Address
- Parameters:
value- Example value, if not provided 127.0.0.
-
ipAddress
@JvmOverloads() final static Matcher ipAddress()
Match an IP Address
-
numeric
@JvmOverloads() final static Matcher numeric(Number value)
Match a numeric value
- Parameters:
value- Example value, if not provided a random one will be generated
-
numeric
@JvmOverloads() final static Matcher numeric()
Match a numeric value
-
decimal
@JvmOverloads() final static Matcher decimal(Number value)
Match a decimal value
- Parameters:
value- Example value, if not provided a random one will be generated
-
decimal
@JvmOverloads() final static Matcher decimal()
Match a decimal value
-
integer
@JvmOverloads() final static Matcher integer(Long value)
Match an integer value
- Parameters:
value- Example value, if not provided a random one will be generated
-
integer
@JvmOverloads() final static Matcher integer()
Match an integer value
-
timestamp
@JvmOverloads() final static Matcher timestamp(String pattern, String value)
Match a timestamp
- Parameters:
pattern- Pattern to use to match.value- Example value, if not provided the current date and time will be used
-
timestamp
@JvmOverloads() final static Matcher timestamp(String pattern)
Match a timestamp
- Parameters:
pattern- Pattern to use to match.
-
timestamp
@JvmOverloads() final static Matcher timestamp()
Match a timestamp
-
time
@JvmOverloads() final static Matcher time(String pattern, String value)
Match a time
- Parameters:
pattern- Pattern to use to match.value- Example value, if not provided the current time will be used
-
time
@JvmOverloads() final static Matcher time(String pattern)
Match a time
- Parameters:
pattern- Pattern to use to match.
-
time
@JvmOverloads() final static Matcher time()
Match a time
-
date
@JvmOverloads() final static Matcher date(String pattern, String value)
Match a date
- Parameters:
pattern- Pattern to use to match.value- Example value, if not provided the current date will be used
-
date
@JvmOverloads() final static Matcher date(String pattern)
Match a date
- Parameters:
pattern- Pattern to use to match.
-
date
@JvmOverloads() final static Matcher date()
Match a date
-
uuid
@JvmOverloads() final static Matcher uuid(String value)
Match a universally unique identifier (UUID)
- Parameters:
value- optional value to use for examples
-
uuid
@JvmOverloads() final static Matcher uuid()
Match a universally unique identifier (UUID)
-
string
@JvmOverloads() final static Matcher string(String value)
Match any string value
- Parameters:
value- Example value, if not provided a random one will be generated
-
string
@JvmOverloads() final static Matcher string()
Match any string value
-
bool
@JvmOverloads() final static Matcher bool(Boolean value)
Match any boolean
- Parameters:
value- Example value, if not provided a random one will be generated
-
bool
@JvmOverloads() final static Matcher bool()
Match any boolean
-
equalTo
final static Matcher equalTo(Object value)
Match Equality
- Parameters:
value- Value to match to
-
includesStr
final static Matcher includesStr(String value)
Matches if the string is included in the value
- Parameters:
value- String value that must be present
-
getHEXADECIMAL
final Regex getHEXADECIMAL()
-
getIP_ADDRESS
final Regex getIP_ADDRESS()
-
getUUID_REGEX
final Regex getUUID_REGEX()
-
-
-
-