From: David ‘Bombe’ Roden Date: Fri, 11 Jan 2013 06:20:42 +0000 (+0100) Subject: Add watcher interface that combines a query, filters, and a trigger. X-Git-Tag: 0.1~37 X-Git-Url: https://git.pterodactylus.net/?p=rhynodge.git;a=commitdiff_plain;h=ea33b911fecab62b0b7364df7f924c3810b7f3a9;hp=6ec36ef950c23c135bf0e112d932c5b7068189b8 Add watcher interface that combines a query, filters, and a trigger. --- diff --git a/src/main/java/net/pterodactylus/rhynodge/Watcher.java b/src/main/java/net/pterodactylus/rhynodge/Watcher.java new file mode 100644 index 0000000..2ded28f --- /dev/null +++ b/src/main/java/net/pterodactylus/rhynodge/Watcher.java @@ -0,0 +1,51 @@ +/* + * Rhynodge - Watcher.java - Copyright © 2013 David Roden + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package net.pterodactylus.rhynodge; + +import java.util.List; + +/** + * A {@code Watcher} combines a {@link Query}, a number of {@link Filter}s, and + * a {@link Trigger}, as these parts are closely related after all. + * + * @author David ‘Bombe’ Roden + */ +public interface Watcher { + + /** + * Returns the query of the watcher. + * + * @return The query of the watcher + */ + public Query query(); + + /** + * Returns the filters of the watcher. + * + * @return The filters of the watcher + */ + public List filters(); + + /** + * Returns the trigger of the watcher. + * + * @return The trigger of the watcher + */ + public Trigger trigger(); + +}