You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
811 B
Kotlin
28 lines
811 B
Kotlin
package me.eater.hefbrug.access
|
|
|
|
data class ExecutionCommand(
|
|
val command: Array<out String>,
|
|
val environment: Map<String, String>,
|
|
val workingDirectory: String?
|
|
) {
|
|
override fun equals(other: Any?): Boolean {
|
|
if (this === other) return true
|
|
if (javaClass != other?.javaClass) return false
|
|
|
|
other as ExecutionCommand
|
|
|
|
if (!command.contentEquals(other.command)) return false
|
|
if (environment != other.environment) return false
|
|
if (workingDirectory != other.workingDirectory) return false
|
|
|
|
return true
|
|
}
|
|
|
|
override fun hashCode(): Int {
|
|
var result = command.contentHashCode()
|
|
result = 31 * result + environment.hashCode()
|
|
result = 31 * result + (workingDirectory?.hashCode() ?: 0)
|
|
return result
|
|
}
|
|
}
|