Ignore chains and states default directories.
[rhynodge.git] / src / main / java / net / pterodactylus / reactor / Trigger.java
index 449b4fe..277eeb6 100644 (file)
@@ -17,6 +17,7 @@
 
 package net.pterodactylus.reactor;
 
+import net.pterodactylus.reactor.output.Output;
 import net.pterodactylus.reactor.states.FileState;
 
 /**
@@ -25,11 +26,9 @@ import net.pterodactylus.reactor.states.FileState;
  * sizes but a trigger might only care about whether the file appeared or
  * disappeared since the last check.
  *
- * @param <S>
- *            The type of the state
  * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
  */
-public interface Trigger<S extends State> {
+public interface Trigger {
 
        /**
         * Checks whether the given states warrant a change trigger.
@@ -41,6 +40,16 @@ public interface Trigger<S extends State> {
         * @return {@code true} if the given states warrant a change trigger,
         *         {@code false} otherwise
         */
-       boolean triggers(S currentState, S previousState);
+       boolean triggers(State currentState, State previousState);
+
+       /**
+        * Returns the output of this trigger. This will only return a meaningful
+        * value if {@link #triggers(State, State)} returns {@code true}.
+        *
+        * @param reaction
+        *            The reaction being triggered
+        * @return The output of this trigger
+        */
+       Output output(Reaction reaction);
 
 }