-
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(String regexp, String value)Match a regular expression final static MatcherhexValue(String value)Match a hexadecimal value final static Matcheridentifier(Object value)Match a numeric identifier (integer) final static MatcheripAddress(String value)Match an IP Address final static Matchernumeric(Number value)Match a numeric value final static Matcherdecimal(Number value)Match a decimal value final static Matcherinteger(Long value)Match an integer value final static Matchertimestamp(String pattern, String value)Match a timestamp final static Matchertime(String pattern, String value)Match a time final static Matcherdate(String pattern, String value)Match a date final static Matcheruuid(String value)Match a universally unique identifier (UUID) final static Matcherstring(String value)Match any string value final static Matcherbool(Boolean value)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(String regexp, String value)
Match a regular expression
- Parameters:
value- Example value, if not provided a random one will be generated
-
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
-
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
-
ipAddress
@JvmOverloads() final static Matcher ipAddress(String value)
Match an IP Address
- Parameters:
value- Example value, if not provided 127.0.0.
-
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
-
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
-
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
-
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
-
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
-
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
-
uuid
@JvmOverloads() final static Matcher uuid(String value)
Match a universally unique identifier (UUID)
- Parameters:
value- optional value to use for examples
-
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
-
bool
@JvmOverloads() final static Matcher bool(Boolean value)
Match any boolean
- Parameters:
value- Example value, if not provided a random one will be generated
-
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()
-
-
-
-