Skip to content

Commit

Permalink
refactor: #81 In NonStandardDictionary, use displayName and `disp…
Browse files Browse the repository at this point in the history
…layNamePrepositional` field names, same as in `StandardDictionary`.
  • Loading branch information
dmitry-weirdo committed Nov 25, 2024
1 parent 7f249c4 commit 53c374d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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) =
Expand All @@ -28,7 +28,7 @@ object VocabularyTopUtils : Logging {

@JvmStatic
fun topByBestSpeedIn(vocabulary: NonStandardDictionary) =
topByBestSpeedIn(vocabulary.namePrepositional)
topByBestSpeedIn(vocabulary.displayNamePrepositional)

@JvmStatic
fun topByBestSpeedIn(vocabularyNamePrepositional: String) =
Expand All @@ -40,7 +40,7 @@ object VocabularyTopUtils : Logging {

@JvmStatic
fun topByRecordIn(vocabulary: NonStandardDictionary) =
topByRecordIn(vocabulary.namePrepositional)
topByRecordIn(vocabulary.displayNamePrepositional)

@JvmStatic
fun topByRecordIn(vocabularyNamePrepositional: String) =
Expand Down Expand Up @@ -133,7 +133,7 @@ object VocabularyTopUtils : Logging {

@JvmStatic
fun topByRacesCountIn(vocabulary: NonStandardDictionary) =
topByRacesCountIn(vocabulary.namePrepositional)
topByRacesCountIn(vocabulary.displayNamePrepositional)

@JvmStatic
fun topByRacesCountIn(vocabularyNamePrepositional: String) =
Expand All @@ -145,7 +145,7 @@ object VocabularyTopUtils : Logging {

@JvmStatic
fun topByHaulIn(vocabulary: NonStandardDictionary) =
topByHaulIn(vocabulary.namePrepositional)
topByHaulIn(vocabulary.displayNamePrepositional)

@JvmStatic
fun topByHaulIn(vocabularyNamePrepositional: String) =
Expand Down

0 comments on commit 53c374d

Please sign in to comment.