From 8b09a3f3d46a1c54e1a5a9713cf6868c074e0f91 Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Thu, 4 Jun 2015 12:09:14 +1000 Subject: Properly mark Generator and ShrinkStrategy with @FunctionalInterface --- src/main/java/au/id/zancanaro/javacheck/Generator.java | 1 + src/main/java/au/id/zancanaro/javacheck/ShrinkStrategy.java | 1 + 2 files changed, 2 insertions(+) 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 The type generated by this generator. */ @SuppressWarnings("unused") +@FunctionalInterface public interface Generator { /** * 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 { Iterator shrink(T obj); } -- cgit v1.2.3