Add name to controllers.
[sonitus.git] / src / main / java / net / pterodactylus / sonitus / data / Controller.java
index 01e157a..6f9de5b 100644 (file)
@@ -22,21 +22,28 @@ package net.pterodactylus.sonitus.data;
  *
  * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
  */
-public interface Controller {
+public interface Controller<V extends Comparable<V>> {
+
+       /**
+        * Returns the name of this controller.
+        *
+        * @return The name of this controller
+        */
+       String name();
 
        /**
         * Returns the minimum value of this controller.
         *
         * @return The minimum value of this controller
         */
-       int minimum();
+       V minimum();
 
        /**
         * Returns the maximum value of this controller.
         *
         * @return The maximum value of this controller
         */
-       int maximum();
+       V maximum();
 
        /**
         * Returns whether this control has a “center” position.
@@ -51,7 +58,7 @@ public interface Controller {
         *
         * @return The current value of this controller
         */
-       int value();
+       V value();
 
        /**
         * Sets the current value of this controller.
@@ -59,6 +66,6 @@ public interface Controller {
         * @param value
         *              The current value of this controller
         */
-       void value(int value);
+       void value(V value);
 
 }