Made enums more usable
This commit is contained in:
parent
bbf5f7ca54
commit
36b5f1cda8
|
@ -1,26 +1,38 @@
|
|||
package de.twomartens.troubleshooting
|
||||
|
||||
enum class Component {
|
||||
PRINTER, PC, MONITOR, TV, ROUTER
|
||||
enum class Component(val string: String) {
|
||||
PRINTER("Printer"),
|
||||
PC("PC"),
|
||||
MONITOR("Monitor"),
|
||||
TV("TV"),
|
||||
ROUTER("Router");
|
||||
|
||||
override fun toString(): String {
|
||||
return string
|
||||
}
|
||||
}
|
||||
|
||||
enum class Problem {
|
||||
enum class Problem(val string: String) {
|
||||
// PRINTER
|
||||
WRONG_COLOUR_PRINTED,
|
||||
WEIRD_SOUNDS_WHEN_PRINTING,
|
||||
WRONG_COLOUR_PRINTED("Wrong colour printed"),
|
||||
WEIRD_SOUNDS_WHEN_PRINTING("Weird sounds when printing"),
|
||||
// PC
|
||||
//SOUNDS, INK, BOOT, DRIVERS, WIFI, CONNECTIVITY, POWER
|
||||
DOES_NOT_BOOT,
|
||||
MOUSE_DOES_NOT_REACT,
|
||||
DOES_NOT_BOOT("Does not boot"),
|
||||
MOUSE_DOES_NOT_REACT("Mouse does not react"),
|
||||
// MONITOR
|
||||
BLACK_BLOBS_VISIBLE,
|
||||
NO_IMAGE_VISIBLE,
|
||||
BLACK_BLOBS_VISIBLE("Black blobs visible"),
|
||||
NO_IMAGE_VISIBLE("No image visible"),
|
||||
// ROUTER
|
||||
NO_INTERNET_CONNECTION,
|
||||
WIFI_DOES_NOT_WORK,
|
||||
NO_INTERNET_CONNECTION("No internet connection"),
|
||||
WIFI_DOES_NOT_WORK("WiFi does not work"),
|
||||
// TV
|
||||
NO_CHANNELS_AVAILABLE,
|
||||
BAD_IMAGE_QUALITY
|
||||
NO_CHANNELS_AVAILABLE("No channels available"),
|
||||
BAD_IMAGE_QUALITY("Bad image quality");
|
||||
|
||||
override fun toString(): String {
|
||||
return string
|
||||
}
|
||||
}
|
||||
|
||||
enum class State {
|
||||
|
|
Loading…
Reference in New Issue