Package net.jqwik.api.state
Interface ChangeDetector<T>
- Type Parameters:
T
- the type of the stateful object
@API(status=EXPERIMENTAL,
since="1.7.0")
public interface ChangeDetector<T>
A change detector is used to determine if a stateful object has changed after the application of a transformer.
This can become improve shrinking of chins and actionChains.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> ChangeDetector<T>
void
Get and remember the state before it is handed to a transformer.static <T> ChangeDetector<T>
A change detector that can be used for immutable types that implement an equals() methodboolean
hasChanged
(T after) Determine if the state object has changed.
-
Method Details
-
forImmutables
A change detector that can be used for immutable types that implement an equals() method- Type Parameters:
T
- the type of the stateful object- Returns:
- new instance of change detector
-
alwaysTrue
-
before
Get and remember the state before it is handed to a transformer. -
hasChanged
Determine if the state object has changed.- Parameters:
after
- The state resulting from handing it to a transformer.
-