Skip to content

Instantly share code, notes, and snippets.

@c4software
Created October 18, 2020 14:24
Show Gist options
  • Select an option

  • Save c4software/11c170fde7c1f93b0ae9e562856c56a8 to your computer and use it in GitHub Desktop.

Select an option

Save c4software/11c170fde7c1f93b0ae9e562856c56a8 to your computer and use it in GitHub Desktop.
/**
* 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