本文整理匯總了Java中com.laytonsmith.core.exceptions.PrefilterNonMatchException類的典型用法代碼示例。如果您正苦於以下問題:Java PrefilterNonMatchException類的具體用法?Java PrefilterNonMatchException怎麽用?Java PrefilterNonMatchException使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
PrefilterNonMatchException類屬於com.laytonsmith.core.exceptions包,在下文中一共展示了PrefilterNonMatchException類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: matches
import com.laytonsmith.core.exceptions.PrefilterNonMatchException; //導入依賴的package包/類
@Override
public boolean matches(Map<String, Construct> prefilter, BindableEvent bindableEvent) throws PrefilterNonMatchException {
if (bindableEvent instanceof MCLilyPadMessageEvent) {
MCLilyPadMessageEvent event = (MCLilyPadMessageEvent) bindableEvent;
Prefilters.match(prefilter, "channel", event.getChannel(), PrefilterType.MACRO);
Prefilters.match(prefilter, "sender", event.getSender(), PrefilterType.MACRO);
return true;
} else {
return false;
}
}
示例2: matches
import com.laytonsmith.core.exceptions.PrefilterNonMatchException; //導入依賴的package包/類
@Override
public boolean matches(Map<String, Construct> prefilter, BindableEvent event) throws PrefilterNonMatchException {
if (event instanceof MCDynmapWebChatEvent) {
MCDynmapWebChatEvent wce = (MCDynmapWebChatEvent) event;
Prefilters.match(prefilter, "source", wce.getSource(), PrefilterType.MACRO);
Prefilters.match(prefilter, "name", wce.getName(), PrefilterType.MACRO);
Prefilters.match(prefilter, "processed", wce.isProcessed(), PrefilterType.BOOLEAN_MATCH);
return true;
} else {
return false;
}
}