Skip to content

Instantly share code, notes, and snippets.

@ReneeVandervelde
Created September 18, 2022 21:55
Show Gist options
  • Save ReneeVandervelde/5e42aacc793e69611d1c92ace2b77b9f to your computer and use it in GitHub Desktop.
Save ReneeVandervelde/5e42aacc793e69611d1c92ace2b77b9f 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