Package io.vavr.test
Class Property.Property1<T1>
java.lang.Object
io.vavr.test.Property.Property1<T1>
- All Implemented Interfaces:
Checkable
- Enclosing class:
Property
Represents a 1-ary checkable property.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
private final CheckedFunction1
<T1, Property.Condition> Fields inherited from interface io.vavr.test.Checkable
DEFAULT_SIZE, DEFAULT_TRIES, RNG
-
Constructor Summary
ConstructorsConstructorDescriptionProperty1
(String name, Arbitrary<T1> a1, CheckedFunction1<T1, Property.Condition> predicate) -
Method Summary
Modifier and TypeMethodDescriptionChecks this property.implies
(CheckedFunction1<T1, Boolean> postcondition) Returns an implication which composes this Property as pre-condition and a given post-condition.
-
Field Details
-
name
-
a1
-
predicate
-
-
Constructor Details
-
Property1
Property1(String name, Arbitrary<T1> a1, CheckedFunction1<T1, Property.Condition> predicate)
-
-
Method Details
-
implies
Returns an implication which composes this Property as pre-condition and a given post-condition.- Parameters:
postcondition
- The postcondition of this implication- Returns:
- A new Checkable implication
-
check
Description copied from interface:Checkable
Checks this property.- Specified by:
check
in interfaceCheckable
- Parameters:
random
- 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
-