Skip to content
Snippets Groups Projects
Commit 0fafc90d authored by Benedikt Wetzel's avatar Benedikt Wetzel
Browse files

use data classes

parent 661cd61a
No related branches found
No related tags found
4 merge requests!159Re-implementation of Theodolite with Kotlin/Quarkus,!157Update Graal Image in CI pipeline,!83WIP: Re-implementation of Theodolite with Kotlin/Quarkus,!78Resolve "Implement Quarkus/Kotlin protype"
package theodolite.util
class LoadDimension(val number: Int) { // data class ?
data class LoadDimension(val number: Int) {
public fun get(): Int {
return this.number;
}
public override fun equals(other: Any?): Boolean {
if (other is LoadDimension) {
return this.get() == other.get()
}
return false
}
override fun hashCode(): Int {
return this.get().hashCode()
}
}
package theodolite.util
class Resource(val number: Int) {
data class Resource(val number: Int) {
public fun get(): Int {
return this.number;
}
public override fun equals(other: Any?): Boolean {
if (other is Resource) {
return this.get() == other.get()
}
return false
}
override fun hashCode(): Int {
return this.get().hashCode()
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment