-
-
Save c4software/11c170fde7c1f93b0ae9e562856c56a8 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
| /** | |
| * LedStatus model | |
| */ | |
| data class LedStatus(var identifier: String = "", var status: Boolean = false) { | |
| fun setIdentifier(identifier: String): LedStatus { | |
| this.identifier = identifier | |
| return this | |
| } | |
| fun setStatus(status: Boolean): LedStatus { | |
| this.status = status | |
| return this | |
| } | |
| fun reverseStatus(): LedStatus { | |
| return setStatus(!status) | |
| } | |
| fun clone(): LedStatus { | |
| return LedStatus(identifier, status) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment