summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarlo Zancanaro <carlo@zancanaro.id.au>2015-06-04 12:09:14 +1000
committerCarlo Zancanaro <carlo@zancanaro.id.au>2015-06-04 12:09:14 +1000
commit8b09a3f3d46a1c54e1a5a9713cf6868c074e0f91 (patch)
treece849ee19918f5e72cb9fc04b383e6903398fb1d /src
parent0aa99a5f941b886597e7366be763dadc8c6db6dd (diff)
Properly mark Generator and ShrinkStrategy with @FunctionalInterface
Diffstat (limited to 'src')
-rw-r--r--src/main/java/au/id/zancanaro/javacheck/Generator.java1
-rw-r--r--src/main/java/au/id/zancanaro/javacheck/ShrinkStrategy.java1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/au/id/zancanaro/javacheck/Generator.java b/src/main/java/au/id/zancanaro/javacheck/Generator.java
index 0679f10..ac731de 100644
--- a/src/main/java/au/id/zancanaro/javacheck/Generator.java
+++ b/src/main/java/au/id/zancanaro/javacheck/Generator.java
@@ -22,6 +22,7 @@ import java.util.function.Predicate;
* @param <T> The type generated by this generator.
*/
@SuppressWarnings("unused")
+@FunctionalInterface
public interface Generator<T> {
/**
* Return a {@link ShrinkTree} containing a new random value of the required
diff --git a/src/main/java/au/id/zancanaro/javacheck/ShrinkStrategy.java b/src/main/java/au/id/zancanaro/javacheck/ShrinkStrategy.java
index 6bd1eb9..0018309 100644
--- a/src/main/java/au/id/zancanaro/javacheck/ShrinkStrategy.java
+++ b/src/main/java/au/id/zancanaro/javacheck/ShrinkStrategy.java
@@ -2,6 +2,7 @@ package au.id.zancanaro.javacheck;
import java.util.Iterator;
+@FunctionalInterface
interface ShrinkStrategy<T> {
Iterator<T> shrink(T obj);
}