summaryrefslogtreecommitdiff
path: root/src/android
diff options
context:
space:
mode:
authorGravatar Charles Lombardo2023-03-07 17:20:06 -0500
committerGravatar bunnei2023-06-03 00:05:36 -0700
commit6f80f9d5b0f2559508783bbdc239bee27deb2568 (patch)
tree51a54e6eab6a1d2a89533de59ed545424f9b14f8 /src/android
parentandroid: Convert IntSetting to Kotlin (diff)
downloadyuzu-6f80f9d5b0f2559508783bbdc239bee27deb2568.tar.gz
yuzu-6f80f9d5b0f2559508783bbdc239bee27deb2568.tar.xz
yuzu-6f80f9d5b0f2559508783bbdc239bee27deb2568.zip
android: Convert Setting to Kotlin
Diffstat (limited to 'src/android')
-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 @@
1package org.yuzu.yuzu_emu.features.settings.model; 1package org.yuzu.yuzu_emu.features.settings.model
2 2
3/** 3/**
4 * Abstraction for a setting item as read from / written to yuzu's configuration ini files. 4 * 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;
6 * must be inferred at read-time. The type of value determines which child of this class is used 6 * must be inferred at read-time. The type of value determines which child of this class is used
7 * to represent the Setting. 7 * to represent the Setting.
8 */ 8 */
9public abstract class Setting { 9abstract class Setting(
10 private String mKey;
11 private String mSection;
12
13 /**
14 * Base constructor.
15 *
16 * @param key Everything to the left of the = in a line from the ini file.
17 * @param section The corresponding recent section header; e.g. [Core] or [Enhancements] without the brackets.
18 */
19 public Setting(String key, String section) {
20 mKey = key;
21 mSection = section;
22 }
23
24 /** 10 /**
25 * @return The identifier used to write this setting to the ini file. 11 * @return The identifier used to write this setting to the ini file.
26 */ 12 */
27 public String getKey() { 13 val key: String,
28 return mKey;
29 }
30
31 /** 14 /**
32 * @return The name of the header under which this Setting should be written in the ini file. 15 * @return The name of the header under which this Setting should be written in the ini file.
33 */ 16 */
34 public String getSection() { 17 val section: String
35 return mSection; 18) {
36 }
37 19
38 /** 20 /**
39 * @return A representation of this Setting's backing value converted to a String (e.g. for serialization). 21 * @return A representation of this Setting's backing value converted to a String (e.g. for serialization).
40 */ 22 */
41 public abstract String getValueAsString(); 23 abstract val valueAsString: String
42} 24}