-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…on` and convert them to Kotlin. Make fields of `Car` visible to Java.
- Loading branch information
1 parent
e732c73
commit 607cd33
Showing
8 changed files
with
78 additions
and
98 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
33 changes: 33 additions & 0 deletions
33
kgCommon/src/main/kotlin/ru/klavogonki/common/DictionaryMode.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,33 @@ | ||
package ru.klavogonki.common | ||
|
||
import ru.klavogonki.common.DictionaryUtils.isStandard | ||
|
||
enum class DictionaryMode( | ||
|
||
/** | ||
* Имя в API клавогонок. Все буквы в нижнем регистре. | ||
*/ | ||
@JvmField val klavogonkiName: String, | ||
) { | ||
normal("normal"), | ||
|
||
noerror("noerror"), | ||
|
||
sprint("sprint"), | ||
|
||
marathon("marathon"), | ||
; | ||
|
||
companion object { | ||
|
||
@JvmStatic | ||
fun getDictionaryMode(dictionaryCode: String): DictionaryMode { | ||
if (!isStandard(dictionaryCode)) { | ||
return normal | ||
} | ||
|
||
val standardDictionary = StandardDictionary.getByKlavogonkiName(dictionaryCode) | ||
return standardDictionary.dictionaryMode | ||
} | ||
} | ||
} |
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
46 changes: 0 additions & 46 deletions
46
kgparserSrv/src/main/java/ru/klavogonki/kgparser/DictionaryMode.java
This file was deleted.
Oops, something went wrong.
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