projects
/
sonitus.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update metadata after opening all filters.
[sonitus.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sonitus
/
data
/
controller
/
Switch.java
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
ae815cb
..
0de8832
100644
(file)
--- a/
src/main/java/net/pterodactylus/sonitus/data/controller/Switch.java
+++ b/
src/main/java/net/pterodactylus/sonitus/data/controller/Switch.java
@@
-22,21
+22,28
@@
package net.pterodactylus.sonitus.data.controller;
*
* @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
*/
*
* @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
*/
-public
abstract class Switch extends AbstractController
{
+public
class Switch extends AbstractController<Boolean>
{
- /** Creates a new switch that is off. */
- public Switch() {
- this(false);
+ /**
+ * Creates a new switch that is off.
+ *
+ * @param name
+ * The name of the switch
+ */
+ public Switch(String name) {
+ this(name, false);
}
/**
* Creates a new switch with the given state.
*
}
/**
* Creates a new switch with the given state.
*
+ * @param name
+ * The name of the switch
* @param active
* The state of the switch
*/
* @param active
* The state of the switch
*/
- public Switch(boolean active) {
- super(
0, 1, false, active ? 1 : 0
);
+ public Switch(
String name,
boolean active) {
+ super(
name, false, true, false, active
);
}
}
}
}