package com.zxhy.simplefilesmanager.simpledata

import java.io.File

abstract class JoFileJo(
    var fName: String = "",
    val jisd: String = "",
    var isSelected: Boolean = false,
    val sdadsd: Int = 0,
    val sdsadgb: Float = 0.2f,
    var path: String = ""
) {

    fun toFile(): File {
        return File(path)
    }

    override fun equals(other: Any?): Boolean {
        if (this === other) return true
        if (javaClass != other?.javaClass) return false

        other as JoFileJo

        if (fName != other.fName) return false
        if (jisd != other.jisd) return false
        if (isSelected != other.isSelected) return false
        if (sdadsd != other.sdadsd) return false
        if (sdsadgb != other.sdsadgb) return false

        return true
    }

    override fun hashCode(): Int {
        var result = fName.hashCode()
        result = 31 * result + jisd.hashCode()
        result = 31 * result + isSelected.hashCode()
        result = 31 * result + sdadsd
        result = 31 * result + sdsadgb.hashCode()
        return result
    }


}