X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Freactor%2FReaction.java;h=e3cfb866aa06deabf7d202cc7a14ef01d3ff59dc;hb=428acf8306397d8e170c950d1ec88870ae45acfb;hp=f7a8c2c49437c676df8d14ce3ff76b61283ee6a8;hpb=fa75d2b7dde0cd47d14bc4a5307b45def635b285;p=rhynodge.git diff --git a/src/main/java/net/pterodactylus/reactor/Reaction.java b/src/main/java/net/pterodactylus/reactor/Reaction.java index f7a8c2c..e3cfb86 100644 --- a/src/main/java/net/pterodactylus/reactor/Reaction.java +++ b/src/main/java/net/pterodactylus/reactor/Reaction.java @@ -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 - * The type of the state * @author David ‘Bombe’ Roden */ -public class Reaction { +public class Reaction { /** The query to run. */ - private final Query query; + private final Query query; /** The trigger to detect changes. */ - private final Trigger trigger; + private final Trigger trigger; /** The action to perform. */ - private final Action 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 { * @param action * The action to perform */ - public Reaction(Query query, Trigger trigger, Action 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 { * * @return The query to run */ - public Query query() { + public Query query() { return query; } @@ -79,7 +71,7 @@ public class Reaction { * * @return The trigger to detect changes */ - public Trigger trigger() { + public Trigger trigger() { return trigger; } @@ -88,29 +80,11 @@ public class Reaction { * * @return The action to perform */ - public Action 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 { * 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; }