mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-12-26 07:00:08 +00:00
android: Convert Setting to Kotlin
This commit is contained in:
parent
6e7fdcb484
commit
6f80f9d5b0
@ -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.
|
* 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
|
* must be inferred at read-time. The type of value determines which child of this class is used
|
||||||
* to represent the Setting.
|
* to represent the Setting.
|
||||||
*/
|
*/
|
||||||
public abstract class Setting {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return The identifier used to write this setting to the ini file.
|
* @return The identifier used to write this setting to the ini file.
|
||||||
*/
|
*/
|
||||||
public String getKey() {
|
val key: String,
|
||||||
return mKey;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return The name of the header under which this Setting should be written in the ini file.
|
* @return The name of the header under which this Setting should be written in the ini file.
|
||||||
*/
|
*/
|
||||||
public String getSection() {
|
val section: String
|
||||||
return mSection;
|
) {
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return A representation of this Setting's backing value converted to a String (e.g. for serialization).
|
* @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
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user