De-generify main interfaces.
[rhynodge.git] / src / main / java / net / pterodactylus / reactor / Reaction.java
index f7a8c2c..e3cfb86 100644 (file)
@@ -21,26 +21,18 @@ package net.pterodactylus.reactor;
  * A {@code Reaction} binds together {@link Query}s, {@link Trigger}s, and
  * {@link Action}s, and it stores the intermediary {@link State}s.
  *
- * @param <S>
- *            The type of the state
  * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
  */
-public class Reaction<S extends State> {
+public class Reaction {
 
        /** The query to run. */
-       private final Query<S> query;
+       private final Query query;
 
        /** The trigger to detect changes. */
-       private final Trigger<S> trigger;
+       private final Trigger trigger;
 
        /** The action to perform. */
-       private final Action<S> action;
-
-       /** The current state of the query. */
-       private S currentState;
-
-       /** The previous state of the query. */
-       private S previousState;
+       private final Action action;
 
        /** The interval in which to run queries (in milliseconds). */
        private long updateInterval;
@@ -55,7 +47,7 @@ public class Reaction<S extends State> {
         * @param action
         *            The action to perform
         */
-       public Reaction(Query<S> query, Trigger<S> trigger, Action<S> action) {
+       public Reaction(Query query, Trigger trigger, Action action) {
                this.query = query;
                this.trigger = trigger;
                this.action = action;
@@ -70,7 +62,7 @@ public class Reaction<S extends State> {
         *
         * @return The query to run
         */
-       public Query<S> query() {
+       public Query query() {
                return query;
        }
 
@@ -79,7 +71,7 @@ public class Reaction<S extends State> {
         *
         * @return The trigger to detect changes
         */
-       public Trigger<S> trigger() {
+       public Trigger trigger() {
                return trigger;
        }
 
@@ -88,29 +80,11 @@ public class Reaction<S extends State> {
         *
         * @return The action to perform
         */
-       public Action<S> action() {
+       public Action action() {
                return action;
        }
 
        /**
-        * Returns the current state of the query.
-        *
-        * @return The current state of the query
-        */
-       public S currentState() {
-               return currentState;
-       }
-
-       /**
-        * Returns the previous state of the query.
-        *
-        * @return The previous state of the query
-        */
-       public S previousState() {
-               return previousState;
-       }
-
-       /**
         * Returns the update interval of this reaction.
         *
         * @return The update interval of this reaction (in milliseconds)
@@ -126,7 +100,7 @@ public class Reaction<S extends State> {
         *            The update interval of this reaction (in milliseconds)
         * @return This reaction
         */
-       public Reaction<?> setUpdateInterval(long updateInterval) {
+       public Reaction setUpdateInterval(long updateInterval) {
                this.updateInterval = updateInterval;
                return this;
        }