templates.kotlin.hashcode.mustache Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of json-kotlin-schema-codegen Show documentation
Show all versions of json-kotlin-schema-codegen Show documentation
Code generation from JSON Schema to Kotlin or Java
{{#hasBaseClassWithProperties}}{{^nonBaseProperties}}{{&indent}} @Suppress("unused")
{{/nonBaseProperties}}{{/hasBaseClassWithProperties}}{{!
}}{{&indent}} override fun hashCode(): Int ={{#hasBaseClassWithProperties}} super.hashCode(){{#nonBaseProperties}} xor
{{&indent}} {{&kotlinName}}.hashCode(){{/nonBaseProperties}}{{/hasBaseClassWithProperties}}{{^hasBaseClassWithProperties}}{{#properties}}{{^baseProperty}}
{{&indent}} {{&kotlinName}}.hashCode(){{^last}} xor{{/last}}{{/baseProperty}}{{/properties}}{{^properties}}0{{/properties}}{{/hasBaseClassWithProperties}}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy