Created
April 28, 2020 09:43
-
-
Save Malinskiy/87d6390eab3ca14439fed4335834e7f3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sealed class Target { | |
abstract fun serialize(): String | |
} | |
object HostTarget : Target() { | |
override fun serialize() = "host:" | |
} | |
class SerialTarget(val serial: String) : Target() { | |
override fun serialize() = "host-serial:$serial:" | |
} | |
object UsbTarget : Target() { | |
override fun serialize() = "host-usb:" | |
} | |
object LocalTarget : Target() { | |
override fun serialize() = "host-local:" | |
} | |
object NonSpecifiedTarget: Target() { | |
override fun serialize() = "" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment