# Kotlin Enum Recipes

DevFeed: [Kotlin Enum Recipes](<https://devfeed.tech/articles/kotlin-enum-recipes-29360.md>)

Original publisher: [Read original article](<https://arturdryomov.dev/posts/kotlin-enum-recipes/>)

Author: Artur Dryomov

Published: 2019-10-08T00:00:00Z

Content type: tutorial

Language: en

Sources: [Artur Dryomov](<https://devfeed.tech/sources/artur-dryomov.md>)

Topics: [enum](<https://devfeed.tech/topics/enum.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Android](<https://devfeed.tech/topics/android.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [article](<https://devfeed.tech/tags/article.md>), [enum](<https://devfeed.tech/tags/enum.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>)

## AI overview

A tutorial on practical Kotlin enum patterns, covering declaration naming, comma placement, namespacing, API modeling, Gson and Moshi deserialization, Android resources, templates, and specification-oriented tests.

## Source excerpt

Enumerations, in a form of enum class declarations, got a bad rep on Android. In fact, the official documentation straight out recommends to avoid them. How rude is that? At the same time, Effective Java has a full chapter about enum. The situation reminds me of the trolley problem. Kind of. In this article, I'll distance myself from Android specifics and show useful enum-related snippets. Declaration Naming Use CamelCase, don't be ashamed. I doubt that anyone names sealed class using the UPPERCASE notation.