-
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.
- Loading branch information
Showing
4 changed files
with
71 additions
and
7 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
27 changes: 27 additions & 0 deletions
27
src/main/kotlin/one/devos/osuv2kt/dsl/BeatmapUserScoreQuery.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,27 @@ | ||
package one.devos.osuv2kt.dsl | ||
|
||
import one.devos.osuv2kt.models.Ruleset | ||
|
||
public class BeatmapUserScoreQuery { | ||
|
||
public var beatmap: Int? = null | ||
|
||
public var user: Int? = null | ||
|
||
public var mode: Ruleset? = null | ||
|
||
public fun validateExceptionally(): BeatmapUserScoreQuery = apply { | ||
if (beatmap == null) { | ||
throw IllegalArgumentException("Beatmap must be set") | ||
} | ||
|
||
if (user == null) { | ||
throw IllegalArgumentException("User must be set") | ||
} | ||
|
||
if (mode == null) { | ||
throw IllegalArgumentException("Mode must be set") | ||
} | ||
} | ||
|
||
} |
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