All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.in.shabinder.soundbound.models.BaseDownloadableModel.kt Maven / Gradle / Ivy

package `in`.shabinder.soundbound.models

import androidx.compose.runtime.Immutable

import kotlinx.serialization.Serializable

@Serializable
@Immutable
abstract class BaseDownloadableModel {
    abstract val downloaded: DownloadStatus

    override fun toString() = "BaseDownloadableModel(downloadStatus=$downloaded)"

    override fun equals(other: Any?): Boolean {
        if (this === other) return true
        if (other !is BaseDownloadableModel) return false
        if (downloaded != other.downloaded) return false
        return true
    }

    override fun hashCode(): Int {
        return downloaded.hashCode()
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy