@FunctionalInterface public interface Checkable
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_SIZE
Default size hint for generators: 100
|
static int |
DEFAULT_TRIES
Default tries to check a property: 1000
|
static Supplier<Random> |
RNG
A thread-safe, equally distributed random number generator.
|
| Modifier and Type | Method and Description |
|---|---|
default Checkable |
and(Checkable checkable)
Returns a new Checkable which is satisfied if this Checkable and the given checkable are satisfied.
|
default CheckResult |
check()
Checks this property using the default random number generator
RNG by calling check(int, int),
where size is DEFAULT_SIZE and tries is DEFAULT_TRIES. |
default CheckResult |
check(int size,
int tries)
Checks this property using the default random number generator
RNG. |
CheckResult |
check(Random randomNumberGenerator,
int size,
int tries)
Checks this property.
|
default Checkable |
or(Checkable checkable)
Returns a new Checkable which is satisfied if this Checkable or the given checkable are satisfied.
|
static final int DEFAULT_SIZE
static final int DEFAULT_TRIES
CheckResult check(Random randomNumberGenerator, int size, int tries)
randomNumberGenerator - An implementation of Random.size - A (not necessarily positive) size hint.tries - A non-negative number of tries to falsify the given property.default CheckResult check(int size, int tries)
RNG.size - A (not necessarily positive) size hint.tries - A non-negative number of tries to falsify the given property.default CheckResult check()
RNG by calling check(int, int),
where size is DEFAULT_SIZE and tries is DEFAULT_TRIES.default Checkable and(Checkable checkable)
First this Checkable is checked.
checkable - A CheckableCopyright © 2021. All Rights Reserved.