From 193b778fc4858c36628cd28f775df6c7b26cfed4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sun, 26 May 2013 17:40:15 +0200 Subject: [PATCH] =?utf8?q?Don=E2=80=99t=20require=20overriding=20valueSet(?= =?utf8?q?)=20anymore,=20a=20do-nothing=20default=20is=20fine.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../pterodactylus/sonitus/data/controller/AbstractController.java | 6 +++++- src/main/java/net/pterodactylus/sonitus/data/controller/Fader.java | 2 +- src/main/java/net/pterodactylus/sonitus/data/controller/Switch.java | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/pterodactylus/sonitus/data/controller/AbstractController.java b/src/main/java/net/pterodactylus/sonitus/data/controller/AbstractController.java index b355a89..d81086c 100644 --- a/src/main/java/net/pterodactylus/sonitus/data/controller/AbstractController.java +++ b/src/main/java/net/pterodactylus/sonitus/data/controller/AbstractController.java @@ -113,10 +113,14 @@ public abstract class AbstractController> implements Con * Adjusts the controller. This method is called from {@link * #value(Comparable)} if the new value is different from the current value. * Also, the value is clamped to fit within the range of this controller. + *

+ * This implementation does nothing. * * @param value * The new value */ - protected abstract void valueSet(V value); + protected void valueSet(V value) { + /* do nothing. */ + } } diff --git a/src/main/java/net/pterodactylus/sonitus/data/controller/Fader.java b/src/main/java/net/pterodactylus/sonitus/data/controller/Fader.java index 279da03..c603199 100644 --- a/src/main/java/net/pterodactylus/sonitus/data/controller/Fader.java +++ b/src/main/java/net/pterodactylus/sonitus/data/controller/Fader.java @@ -24,7 +24,7 @@ import net.pterodactylus.sonitus.data.Controller; * * @author David ‘Bombe’ Roden */ -public abstract class Fader extends AbstractController { +public class Fader extends AbstractController { /** * Creates a new fader that is at maximum position. diff --git a/src/main/java/net/pterodactylus/sonitus/data/controller/Switch.java b/src/main/java/net/pterodactylus/sonitus/data/controller/Switch.java index 1b997d4..0de8832 100644 --- a/src/main/java/net/pterodactylus/sonitus/data/controller/Switch.java +++ b/src/main/java/net/pterodactylus/sonitus/data/controller/Switch.java @@ -22,7 +22,7 @@ package net.pterodactylus.sonitus.data.controller; * * @author David ‘Bombe’ Roden */ -public abstract class Switch extends AbstractController { +public class Switch extends AbstractController { /** * Creates a new switch that is off. -- 2.7.4