feat: デフォルト引数を追加

This commit is contained in:
usbharu 2024-01-29 20:55:08 +09:00
parent 75429f3a46
commit 60859431af
Signed by: usbharu
GPG Key ID: 6556747BF94EEBC8
1 changed files with 15 additions and 9 deletions

View File

@ -23,14 +23,20 @@ sealed class Page {
} }
companion object { companion object {
fun of(maxId: Long?, sinceId: Long?, minId: Long?, limit: Int?): Page = if (minId != null) { fun of(
PageByMinId( maxId: Long? = null,
maxId, minId, limit sinceId: Long? = null,
) minId: Long? = null,
} else { limit: Int? = null
PageByMaxId( ): Page =
maxId, sinceId, limit if (minId != null) {
) PageByMinId(
} maxId, minId, limit
)
} else {
PageByMaxId(
maxId, sinceId, limit
)
}
} }
} }