Skip to content

Instantly share code, notes, and snippets.

@ReneeVandervelde
Last active September 18, 2022 21:53
Show Gist options
  • Save ReneeVandervelde/415982e69d6a880c1a9c368aeb1da4c7 to your computer and use it in GitHub Desktop.
Save ReneeVandervelde/415982e69d6a880c1a9c368aeb1da4c7 to your computer and use it in GitHub Desktop.
value class LightType private constructor(
private val type: String,
) {
companion object {
val LightBulb = LightType("light_bulb")
val LightStrip = LightType("light_strip")
val FloodLight = LightType("flood_light")
fun values() = arrayOf(LightBulb, LightStrip, FloodLight)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment