-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #128 from Shikkanime/dev
Dev
- Loading branch information
Showing
16 changed files
with
270 additions
and
260 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
src/main/kotlin/fr/shikkanime/caches/CountryCodeNamePaginationKeyCache.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package fr.shikkanime.caches | ||
|
||
import fr.shikkanime.entities.enums.CountryCode | ||
|
||
data class CountryCodeNamePaginationKeyCache( | ||
override val countryCode: CountryCode?, | ||
val name: String, | ||
override val page: Int, | ||
override val limit: Int, | ||
) : CountryCodePaginationKeyCache(countryCode, page, limit) { | ||
override fun equals(other: Any?): Boolean { | ||
if (this === other) return true | ||
if (javaClass != other?.javaClass) return false | ||
if (!super.equals(other)) return false | ||
|
||
other as CountryCodeNamePaginationKeyCache | ||
|
||
if (countryCode != other.countryCode) return false | ||
if (name != other.name) return false | ||
if (page != other.page) return false | ||
if (limit != other.limit) return false | ||
|
||
return true | ||
} | ||
|
||
override fun hashCode(): Int { | ||
var result = super.hashCode() | ||
result = 31 * result + (countryCode?.hashCode() ?: 0) | ||
result = 31 * result + name.hashCode() | ||
result = 31 * result + page | ||
result = 31 * result + limit | ||
return result | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
src/main/kotlin/fr/shikkanime/caches/CountryCodePaginationKeyCache.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package fr.shikkanime.caches | ||
|
||
import fr.shikkanime.entities.enums.CountryCode | ||
|
||
open class CountryCodePaginationKeyCache( | ||
open val countryCode: CountryCode?, | ||
open val page: Int, | ||
open val limit: Int, | ||
) { | ||
override fun equals(other: Any?): Boolean { | ||
if (this === other) return true | ||
if (javaClass != other?.javaClass) return false | ||
|
||
other as CountryCodePaginationKeyCache | ||
|
||
if (countryCode != other.countryCode) return false | ||
if (page != other.page) return false | ||
if (limit != other.limit) return false | ||
|
||
return true | ||
} | ||
|
||
override fun hashCode(): Int { | ||
var result = countryCode?.hashCode() ?: 0 | ||
result = 31 * result + page | ||
result = 31 * result + limit | ||
return result | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.