Effective Kotlin: Item 4 — Enforce noninstantiability with a private constructor

Item 4 of Effective Java discusses enforcing non-instantiability of, generally, utility classes. Using Kotlin’s Object declarations allows us to implement the Singleton pattern with ease, item 3 has more details, but this isn’t the only approach to utility classes in Kotlin.

Examples of utility classes in Java consist of Math and Arrays. In Android, most people will have come across Log and TextUtils.