From 53c374df3949fde7a40c2d29a8f8c8c6d1fd19fb Mon Sep 17 00:00:00 2001 From: dmitry-weirdo Date: Mon, 25 Nov 2024 20:29:09 +0100 Subject: [PATCH] refactor: #81 In `NonStandardDictionary`, use `displayName` and `displayNamePrepositional` field names, same as in `StandardDictionary`. --- .../klavogonki/kgparser/NonStandardDictionary.java | 14 +++++++------- .../export/vocabulary/VocabularyTopUtils.kt | 10 +++++----- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/kgparserSrv/src/main/java/ru/klavogonki/kgparser/NonStandardDictionary.java b/kgparserSrv/src/main/java/ru/klavogonki/kgparser/NonStandardDictionary.java index e9bdb1313..4098cfa67 100644 --- a/kgparserSrv/src/main/java/ru/klavogonki/kgparser/NonStandardDictionary.java +++ b/kgparserSrv/src/main/java/ru/klavogonki/kgparser/NonStandardDictionary.java @@ -59,17 +59,17 @@ public enum NonStandardDictionary { ; - NonStandardDictionary(final int code, final String name, final String namePrepositional) { - this(Dictionary.NON_STANDARD_DICTIONARY_ID_PREFIX + code, name, namePrepositional); + NonStandardDictionary(final int code, final String displayName, final String displayNamePrepositional) { + this(Dictionary.NON_STANDARD_DICTIONARY_ID_PREFIX + code, displayName, displayNamePrepositional); } - NonStandardDictionary(final String code, final String name, final String namePrepositional) { + NonStandardDictionary(final String code, final String displayName, final String displayNamePrepositional) { this.code = code; - this.name = name; - this.namePrepositional = namePrepositional; + this.displayName = displayName; + this.displayNamePrepositional = displayNamePrepositional; } public final String code; - public final String name; - public final String namePrepositional; + public final String displayName; + public final String displayNamePrepositional; } diff --git a/kgstatsSrv/src/main/kotlin/ru/klavogonki/statistics/export/vocabulary/VocabularyTopUtils.kt b/kgstatsSrv/src/main/kotlin/ru/klavogonki/statistics/export/vocabulary/VocabularyTopUtils.kt index cab3c2db8..30b260199 100644 --- a/kgstatsSrv/src/main/kotlin/ru/klavogonki/statistics/export/vocabulary/VocabularyTopUtils.kt +++ b/kgstatsSrv/src/main/kotlin/ru/klavogonki/statistics/export/vocabulary/VocabularyTopUtils.kt @@ -16,7 +16,7 @@ object VocabularyTopUtils : Logging { @JvmStatic fun takenPlayersWithMinimalRacesCount(vocabulary: NonStandardDictionary, racesCount: Int) = - takenPlayersWithMinimalRacesCount(vocabulary.namePrepositional, racesCount) + takenPlayersWithMinimalRacesCount(vocabulary.displayNamePrepositional, racesCount) @JvmStatic fun takenPlayersWithMinimalRacesCount(vocabularyNamePrepositional: String, racesCount: Int) = @@ -28,7 +28,7 @@ object VocabularyTopUtils : Logging { @JvmStatic fun topByBestSpeedIn(vocabulary: NonStandardDictionary) = - topByBestSpeedIn(vocabulary.namePrepositional) + topByBestSpeedIn(vocabulary.displayNamePrepositional) @JvmStatic fun topByBestSpeedIn(vocabularyNamePrepositional: String) = @@ -40,7 +40,7 @@ object VocabularyTopUtils : Logging { @JvmStatic fun topByRecordIn(vocabulary: NonStandardDictionary) = - topByRecordIn(vocabulary.namePrepositional) + topByRecordIn(vocabulary.displayNamePrepositional) @JvmStatic fun topByRecordIn(vocabularyNamePrepositional: String) = @@ -133,7 +133,7 @@ object VocabularyTopUtils : Logging { @JvmStatic fun topByRacesCountIn(vocabulary: NonStandardDictionary) = - topByRacesCountIn(vocabulary.namePrepositional) + topByRacesCountIn(vocabulary.displayNamePrepositional) @JvmStatic fun topByRacesCountIn(vocabularyNamePrepositional: String) = @@ -145,7 +145,7 @@ object VocabularyTopUtils : Logging { @JvmStatic fun topByHaulIn(vocabulary: NonStandardDictionary) = - topByHaulIn(vocabulary.namePrepositional) + topByHaulIn(vocabulary.displayNamePrepositional) @JvmStatic fun topByHaulIn(vocabularyNamePrepositional: String) =