From 74c868e544c49ac7587f18690b973a9093a9a896 Mon Sep 17 00:00:00 2001 From: "chen.ma" Date: Mon, 5 Sep 2022 22:08:04 +0800 Subject: [PATCH] FunctionalInterface method to add annotations --- .../src/main/java/cn/hippo4j/common/function/Matcher.java | 3 +++ .../main/java/cn/hippo4j/common/function/NoArgsConsumer.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/hippo4j-common/src/main/java/cn/hippo4j/common/function/Matcher.java b/hippo4j-common/src/main/java/cn/hippo4j/common/function/Matcher.java index 918ec3ee..a6377d2d 100644 --- a/hippo4j-common/src/main/java/cn/hippo4j/common/function/Matcher.java +++ b/hippo4j-common/src/main/java/cn/hippo4j/common/function/Matcher.java @@ -23,5 +23,8 @@ package cn.hippo4j.common.function; @FunctionalInterface public interface Matcher { + /** + * Returns {@code true} if this matches {@code t}, {@code false} otherwise. + */ boolean match(T t); } diff --git a/hippo4j-common/src/main/java/cn/hippo4j/common/function/NoArgsConsumer.java b/hippo4j-common/src/main/java/cn/hippo4j/common/function/NoArgsConsumer.java index 878691ec..cc4adc7c 100644 --- a/hippo4j-common/src/main/java/cn/hippo4j/common/function/NoArgsConsumer.java +++ b/hippo4j-common/src/main/java/cn/hippo4j/common/function/NoArgsConsumer.java @@ -23,5 +23,8 @@ package cn.hippo4j.common.function; @FunctionalInterface public interface NoArgsConsumer { + /** + * Execute operation without parameters. + */ void accept(); }