Interface Checkable
- All Known Implementing Classes:
Property.Property1, Property.Property2, Property.Property3, Property.Property4, Property.Property5, Property.Property6, Property.Property7, Property.Property8
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Interface for checkable properties, allowing composition via and(Checkable) and or(Checkable).
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault size hint for generators: 100static final intDefault tries to check a property: 1000A thread-safe, equally distributed random number generator. -
Method Summary
Modifier and TypeMethodDescriptiondefault CheckableReturns a new Checkable which is satisfied if this Checkable and the given checkable are satisfied.default CheckResultcheck()Checks this property using the default random number generatorRNGby callingcheck(int, int), where size isDEFAULT_SIZEand tries isDEFAULT_TRIES.default CheckResultcheck(int size, int tries) Checks this property using the default random number generatorRNG.Checks this property.default CheckableReturns a new Checkable which is satisfied if this Checkable or the given checkable are satisfied.
-
Field Details
-
RNG
-
DEFAULT_SIZE
static final int DEFAULT_SIZEDefault size hint for generators: 100- See Also:
-
DEFAULT_TRIES
static final int DEFAULT_TRIESDefault tries to check a property: 1000- See Also:
-
-
Method Details
-
check
Checks this property.- Parameters:
randomNumberGenerator- An implementation ofRandom.size- A (not necessarily positive) size hint.tries- A non-negative number of tries to falsify the given property.- Returns:
- A CheckResult
-
check
Checks this property using the default random number generatorRNG.- Parameters:
size- A (not necessarily positive) size hint.tries- A non-negative number of tries to falsify the given property.- Returns:
- A CheckResult
-
check
Checks this property using the default random number generatorRNGby callingcheck(int, int), where size isDEFAULT_SIZEand tries isDEFAULT_TRIES.- Returns:
- A CheckResult
-
and
-
or
-