public class Matchers
Base class for DSL matcher methods
@JvmStatic @JvmOverloads @NotNull public static Matcher regexp(@NotNull java.util.regex.Pattern re, @Nullable java.lang.String value)
Match a regular expression
re - Regular expression patternvalue - Example value, if not provided a random one will be generated@JvmStatic @JvmOverloads @NotNull public static Matcher regexp(@NotNull java.util.regex.Pattern re)
Match a regular expression
re - Regular expression pattern@JvmStatic @JvmOverloads @NotNull public static Matcher regexp(@NotNull java.lang.String regexp, @Nullable java.lang.String value)
Match a regular expression
value - Example value, if not provided a random one will be generated@JvmStatic @JvmOverloads @NotNull public static Matcher regexp(@NotNull java.lang.String regexp)
Match a regular expression
@JvmStatic @JvmOverloads @NotNull public static Matcher hexValue(@Nullable java.lang.String value)
Match a hexadecimal value
value - Example value, if not provided a random one will be generated@JvmStatic @JvmOverloads @NotNull public static Matcher hexValue()
Match a hexadecimal value
@JvmStatic @JvmOverloads @NotNull public static Matcher identifier(@Nullable java.lang.Object value)
Match a numeric identifier (integer)
value - Example value, if not provided a random one will be generated@JvmStatic @JvmOverloads @NotNull public static Matcher identifier()
Match a numeric identifier (integer)
@JvmStatic @JvmOverloads @NotNull public static Matcher ipAddress(@Nullable java.lang.String value)
Match an IP Address
value - Example value, if not provided 127.0.0.1 will be generated@JvmStatic @JvmOverloads @NotNull public static Matcher ipAddress()
Match an IP Address
@JvmStatic @JvmOverloads @NotNull public static Matcher numeric(@Nullable java.lang.Number value)
Match a numeric value
value - Example value, if not provided a random one will be generated@JvmStatic @JvmOverloads @NotNull public static Matcher numeric()
Match a numeric value
@JvmStatic @JvmOverloads @NotNull public static Matcher decimal(@Nullable java.lang.Number value)
Match a decimal value
value - Example value, if not provided a random one will be generated@JvmStatic @JvmOverloads @NotNull public static Matcher decimal()
Match a decimal value
@JvmStatic @JvmOverloads @NotNull public static Matcher integer(@Nullable java.lang.Long value)
Match a integer value
value - Example value, if not provided a random one will be generated@JvmStatic @JvmOverloads @NotNull public static Matcher integer()
Match a integer value
@Deprecated @JvmStatic @JvmOverloads @NotNull public static Matcher timestamp(@NotNull java.lang.String pattern, @Nullable java.lang.String value)
Match a timestamp
pattern - Pattern to use to match. If not provided, an ISO pattern will be used.value - Example value, if not provided the current date and time will be used@Deprecated @JvmStatic @JvmOverloads @NotNull public static Matcher timestamp(@NotNull java.lang.String pattern)
Match a timestamp
pattern - Pattern to use to match. If not provided, an ISO pattern will be used.@Deprecated @JvmStatic @JvmOverloads @NotNull public static Matcher timestamp()
Match a timestamp
@Deprecated @JvmStatic @JvmOverloads @NotNull public static Matcher timestampExpression(@NotNull java.lang.String expression, @NotNull java.lang.String pattern)
Match a timestamp generated from an expression
expression - Expression to use to generate the timestamppattern - Pattern to use to match. If not provided, an ISO pattern will be used.@Deprecated @JvmStatic @JvmOverloads @NotNull public static Matcher timestampExpression(@NotNull java.lang.String expression)
Match a timestamp generated from an expression
expression - Expression to use to generate the timestamp@JvmStatic @JvmOverloads @NotNull public static Matcher datetime(@NotNull java.lang.String pattern, @Nullable java.lang.String value)
Match a datetime
pattern - Pattern to use to match. If not provided, an ISO pattern will be used.value - Example value, if not provided the current date and time will be used@JvmStatic @JvmOverloads @NotNull public static Matcher datetime(@NotNull java.lang.String pattern)
Match a datetime
pattern - Pattern to use to match. If not provided, an ISO pattern will be used.@JvmStatic @JvmOverloads @NotNull public static Matcher datetime()
Match a datetime
@JvmStatic @JvmOverloads @NotNull public static Matcher time(@NotNull java.lang.String pattern, @Nullable java.lang.String value)
Match a time
pattern - Pattern to use to match. If not provided, an ISO pattern will be used.value - Example value, if not provided the current time will be used@JvmStatic @JvmOverloads @NotNull public static Matcher time(@NotNull java.lang.String pattern)
Match a time
pattern - Pattern to use to match. If not provided, an ISO pattern will be used.@JvmStatic @JvmOverloads @NotNull public static Matcher time()
Match a time
@JvmStatic @JvmOverloads @NotNull public static Matcher timeExpression(@NotNull java.lang.String expression, @NotNull java.lang.String pattern)
Match a time generated from an expression
expression - Expression to use to generate the timepattern - Pattern to use to match. If not provided, an ISO pattern will be used.@JvmStatic @JvmOverloads @NotNull public static Matcher timeExpression(@NotNull java.lang.String expression)
Match a time generated from an expression
expression - Expression to use to generate the time@JvmStatic @JvmOverloads @NotNull public static Matcher date(@NotNull java.lang.String pattern, @Nullable java.lang.String value)
Match a date
pattern - Pattern to use to match. If not provided, an ISO pattern will be used.value - Example value, if not provided the current date will be used@JvmStatic @JvmOverloads @NotNull public static Matcher date(@NotNull java.lang.String pattern)
Match a date
pattern - Pattern to use to match. If not provided, an ISO pattern will be used.@JvmStatic @JvmOverloads @NotNull public static Matcher date()
Match a date
@JvmStatic @JvmOverloads @NotNull public static Matcher dateExpression(@NotNull java.lang.String expression, @NotNull java.lang.String pattern)
Match a date generated from an expression
expression - Expression to use to generate the datepattern - Pattern to use to match. If not provided, an ISO pattern will be used.@JvmStatic @JvmOverloads @NotNull public static Matcher dateExpression(@NotNull java.lang.String expression)
Match a date generated from an expression
expression - Expression to use to generate the date@JvmStatic @JvmOverloads @NotNull public static Matcher uuid(@Nullable java.lang.String value)
Match a universally unique identifier (UUID)
value - optional value to use for examples@JvmStatic @JvmOverloads @NotNull public static Matcher uuid()
Match a universally unique identifier (UUID)
@JvmStatic @JvmOverloads @NotNull public static Matcher string(@Nullable java.lang.String value)
Match any string value
value - Example value, if not provided a random one will be generated@JvmStatic @JvmOverloads @NotNull public static Matcher string()
Match any string value
@JvmStatic @JvmOverloads @NotNull public static Matcher bool(@Nullable java.lang.Boolean value)
Match any boolean
value - Example value, if not provided a random one will be generated@JvmStatic @JvmOverloads @NotNull public static Matcher bool()
Match any boolean
@JvmStatic @JvmOverloads @NotNull public static Matcher eachLike(int numberExamples, @NotNull java.lang.Object arg)
Array where each element like the following object
numberExamples - Optional number of examples to generate. Defaults to 1.@JvmStatic @JvmOverloads @NotNull public static Matcher eachLike(@NotNull java.lang.Object arg)
Array where each element like the following object
@JvmStatic @JvmOverloads @NotNull public static Matcher maxLike(int max, int numberExamples, @NotNull java.lang.Object arg)
Array with maximum size and each element like the following object
max - The maximum size of the arraynumberExamples - Optional number of examples to generate. Defaults to 1.@JvmStatic @JvmOverloads @NotNull public static Matcher maxLike(int max, @NotNull java.lang.Object arg)
Array with maximum size and each element like the following object
max - The maximum size of the array@JvmStatic @JvmOverloads @NotNull public static Matcher minLike(int min, int numberExamples, @NotNull java.lang.Object arg)
Array with minimum size and each element like the following object
min - The minimum size of the arraynumberExamples - Optional number of examples to generate. Defaults to 1.@JvmStatic @JvmOverloads @NotNull public static Matcher minLike(int min, @NotNull java.lang.Object arg)
Array with minimum size and each element like the following object
min - The minimum size of the array@JvmStatic @JvmOverloads @NotNull public static Matcher minMaxLike(int min, int max, int numberExamples, @NotNull java.lang.Object arg)
Array with minimum and maximum size and each element like the following object
min - The minimum size of the arraymax - The maximum size of the arraynumberExamples - Optional number of examples to generate. Defaults to 1.@JvmStatic @JvmOverloads @NotNull public static Matcher minMaxLike(int min, int max, @NotNull java.lang.Object arg)
Array with minimum and maximum size and each element like the following object
min - The minimum size of the arraymax - The maximum size of the array@JvmStatic @NotNull public static Matcher equalTo(@NotNull java.lang.Object value)
Match Equality
value - Value to match to@JvmStatic @NotNull public static Matcher includesStr(@NotNull java.lang.String value)
Matches if the string is included in the value
value - String value that must be present@JvmStatic @NotNull public static Matcher or(@Nullable java.lang.Object example, @NotNull java.lang.Object... values)
Matches if any of the provided matches match
example - Example value to use@JvmStatic @NotNull public static Matcher and(@Nullable java.lang.Object example, @NotNull java.lang.Object... values)
Matches if all of the provided matches match
example - Example value to use@JvmStatic @NotNull public static Matcher nullValue()
Matches a null value
@JvmStatic @NotNull public static Matcher url(@NotNull java.lang.String basePath, @NotNull java.lang.Object... pathFragments)
Matches a URL composed of a base path and a list of path fragments
@JvmStatic @JvmOverloads @NotNull public static Matcher eachArrayLike(int numberExamples, @NotNull java.lang.Object arg)
Array of arrays where each element like the following object
numberExamples - Optional number of examples to generate. Defaults to 1.@JvmStatic @JvmOverloads @NotNull public static Matcher eachArrayLike(@NotNull java.lang.Object arg)
Array of arrays where each element like the following object