Kassava

screenshot of Kassava

This library provides some useful kotlin extension functions for implementing toString(), hashCode() and equals() without all of the boilerplate.

Overview

Kassava is a library that provides useful Kotlin extension functions for implementing toString(), equals(), and hashCode() methods without the need for boilerplate code. It was created to address situations where data classes cannot be used and manual implementation of these methods is required.

Features

  • Provides Kotlin extension functions for implementing toString(), equals(), and hashCode() methods without boilerplate code.
  • Supports customizable toString() format that replicates Kotlin's data class format.
  • Provides reflectionEquals() and reflectionToString() functions for easy implementation, but with lower performance.
  • Offers a lightweight implementation without dependencies on other libraries.
  • Includes support for implementing polymorphic equality using the SupportsMixedTypeEquality interface.

Summary

Kassava is a Kotlin library that simplifies the implementation of toString(), equals(), and hashCode() methods in situations where data classes cannot be used. It provides extension functions that eliminate the need for boilerplate code and offers a lightweight implementation without dependencies on other libraries. Additionally, Kassava supports customizable toString() formats and provides functions for implementing polymorphic equality.