From d92873c1f5459d65b9db8cbdafbb06de6000046f Mon Sep 17 00:00:00 2001 From: LamGC Date: Thu, 5 Nov 2020 13:32:18 +0800 Subject: [PATCH] =?UTF-8?q?[Fix][Document]=20Event=20=E4=BF=AE=E5=A4=8D=20?= =?UTF-8?q?SupportedCancel=20=E4=B8=AD=20javadoc=20=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E7=9A=84=E9=94=99=E8=AF=AF;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [Fix][Document] SupportedCancel 修复文档上的细节错误; --- .../main/java/net/lamgc/cgj/bot/event/SupportedCancel.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ContentGrabbingJi-Event/src/main/java/net/lamgc/cgj/bot/event/SupportedCancel.java b/ContentGrabbingJi-Event/src/main/java/net/lamgc/cgj/bot/event/SupportedCancel.java index c0bba9a..4e15a31 100644 --- a/ContentGrabbingJi-Event/src/main/java/net/lamgc/cgj/bot/event/SupportedCancel.java +++ b/ContentGrabbingJi-Event/src/main/java/net/lamgc/cgj/bot/event/SupportedCancel.java @@ -41,7 +41,7 @@ public interface SupportedCancel { * @param event 事件对象. * @return 如果成功, 返回 true, 如果事件已执行完成, 返回 false. * @throws UnsupportedOperationException 当事件未实现 {@link Cancelable} 接口时抛出. - * @throws NoSuchElementException 当 EventId 所属事件在 {@link SupportedCancel} 中无法找到时抛出. + * @throws NoSuchElementException 当事件在 {@link SupportedCancel} 中无法找到时抛出. */ boolean cancelEvent(EventObject event) throws UnsupportedOperationException, NoSuchElementException; @@ -49,8 +49,9 @@ public interface SupportedCancel { * 对可取消对象执行取消处理操作. * @param cancelableEvent 可取消对象事件. * @return 如果成功, 返回 true, 如果事件已执行完成, 返回 false. - * @throws NoSuchElementException 当 EventId 所属事件在 {@link SupportedCancel} 中无法找到时抛出. + * @throws NoSuchElementException 当事件在 {@link SupportedCancel} 中无法找到时抛出. + * @throws IllegalArgumentException 当 Cancelable 对象未实现 {@link EventObject} (即不是一个事件对象) 时抛出. */ - boolean cancelEvent(Cancelable cancelableEvent) throws NoSuchElementException; + boolean cancelEvent(Cancelable cancelableEvent) throws NoSuchElementException, IllegalArgumentException; }