diff options
author | Charles Lombardo <clombardo169@gmail.com> | 2023-03-07 23:20:06 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2023-06-03 09:05:36 +0200 |
commit | 6f80f9d5b0f2559508783bbdc239bee27deb2568 (patch) | |
tree | 51a54e6eab6a1d2a89533de59ed545424f9b14f8 /src/android/app | |
parent | android: Convert IntSetting to Kotlin (diff) | |
download | yuzu-6f80f9d5b0f2559508783bbdc239bee27deb2568.tar yuzu-6f80f9d5b0f2559508783bbdc239bee27deb2568.tar.gz yuzu-6f80f9d5b0f2559508783bbdc239bee27deb2568.tar.bz2 yuzu-6f80f9d5b0f2559508783bbdc239bee27deb2568.tar.lz yuzu-6f80f9d5b0f2559508783bbdc239bee27deb2568.tar.xz yuzu-6f80f9d5b0f2559508783bbdc239bee27deb2568.tar.zst yuzu-6f80f9d5b0f2559508783bbdc239bee27deb2568.zip |
Diffstat (limited to 'src/android/app')
-rw-r--r-- | src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/Setting.kt (renamed from src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/Setting.java) | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/Setting.java b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/Setting.kt index 28003078a..11cd10a1e 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/Setting.java +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/Setting.kt @@ -1,4 +1,4 @@ -package org.yuzu.yuzu_emu.features.settings.model; +package org.yuzu.yuzu_emu.features.settings.model /** * Abstraction for a setting item as read from / written to yuzu's configuration ini files. @@ -6,37 +6,19 @@ package org.yuzu.yuzu_emu.features.settings.model; * must be inferred at read-time. The type of value determines which child of this class is used * to represent the Setting. */ -public abstract class Setting { - private String mKey; - private String mSection; - - /** - * Base constructor. - * - * @param key Everything to the left of the = in a line from the ini file. - * @param section The corresponding recent section header; e.g. [Core] or [Enhancements] without the brackets. - */ - public Setting(String key, String section) { - mKey = key; - mSection = section; - } - +abstract class Setting( /** * @return The identifier used to write this setting to the ini file. */ - public String getKey() { - return mKey; - } - + val key: String, /** * @return The name of the header under which this Setting should be written in the ini file. */ - public String getSection() { - return mSection; - } + val section: String +) { /** * @return A representation of this Setting's backing value converted to a String (e.g. for serialization). */ - public abstract String getValueAsString(); + abstract val valueAsString: String } |