From 0597c3383fcd7d8d2d2e5d0367eeeb6498231109 Mon Sep 17 00:00:00 2001 From: Sean Gilligan Date: Tue, 12 Sep 2023 09:38:11 -0700 Subject: [PATCH] CoinSelector: mark as functional interface The `@FunctionalInterface` annotation doesn't change behavior of `CoinSelector` in any way. It just declares our intention that it be used as a functional interface and will generate compiler errors if someone changes the code so that it is no longer a SAM type. --- core/src/main/java/org/bitcoinj/wallet/CoinSelector.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/main/java/org/bitcoinj/wallet/CoinSelector.java b/core/src/main/java/org/bitcoinj/wallet/CoinSelector.java index 0005dde44..ae5203c7b 100644 --- a/core/src/main/java/org/bitcoinj/wallet/CoinSelector.java +++ b/core/src/main/java/org/bitcoinj/wallet/CoinSelector.java @@ -31,6 +31,7 @@ import static java.util.stream.Collectors.collectingAndThen; * may return a {@link CoinSelection} that has a valueGathered lower than the requested target, if there's not * enough money in the wallet. */ +@FunctionalInterface public interface CoinSelector { /** * Creates a CoinSelection that tries to meet the target amount of value. The candidates list is given to