mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-12-25 19:02:45 -06:00
android: Convert BooleanSetting to Kotlin
This commit is contained in:
parent
b98aaf1635
commit
88b9d484e8
2 changed files with 9 additions and 23 deletions
|
@ -1,23 +0,0 @@
|
||||||
package org.yuzu.yuzu_emu.features.settings.model;
|
|
||||||
|
|
||||||
public final class BooleanSetting extends Setting {
|
|
||||||
private boolean mValue;
|
|
||||||
|
|
||||||
public BooleanSetting(String key, String section, boolean value) {
|
|
||||||
super(key, section);
|
|
||||||
mValue = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean getValue() {
|
|
||||||
return mValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setValue(boolean value) {
|
|
||||||
mValue = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getValueAsString() {
|
|
||||||
return mValue ? "True" : "False";
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
package org.yuzu.yuzu_emu.features.settings.model
|
||||||
|
|
||||||
|
class BooleanSetting(
|
||||||
|
key: String,
|
||||||
|
section: String,
|
||||||
|
var value: Boolean
|
||||||
|
) : Setting(key, section) {
|
||||||
|
override val valueAsString = if (value) "True" else "False"
|
||||||
|
}
|
Loading…
Reference in a new issue