Android: Convert AbstractSetting to Kotlin
This commit is contained in:
parent
43fa5cf5e4
commit
21e0b5b9d9
|
@ -1,14 +0,0 @@
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
|
|
||||||
package org.dolphinemu.dolphinemu.features.settings.model;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
|
|
||||||
public interface AbstractSetting
|
|
||||||
{
|
|
||||||
boolean isOverridden();
|
|
||||||
|
|
||||||
boolean isRuntimeEditable();
|
|
||||||
|
|
||||||
boolean delete(@NonNull Settings settings);
|
|
||||||
}
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
package org.dolphinemu.dolphinemu.features.settings.model
|
||||||
|
|
||||||
|
interface AbstractSetting {
|
||||||
|
val isOverridden: Boolean
|
||||||
|
val isRuntimeEditable: Boolean
|
||||||
|
|
||||||
|
fun delete(settings: Settings): Boolean
|
||||||
|
}
|
|
@ -6,13 +6,11 @@ class ScaledIntSetting(
|
||||||
private val scale: Int,
|
private val scale: Int,
|
||||||
private val setting: AbstractIntSetting
|
private val setting: AbstractIntSetting
|
||||||
) : AbstractIntSetting {
|
) : AbstractIntSetting {
|
||||||
override fun isOverridden(): Boolean {
|
override val isOverridden: Boolean
|
||||||
return setting.isOverridden()
|
get() = setting.isOverridden
|
||||||
}
|
|
||||||
|
|
||||||
override fun isRuntimeEditable(): Boolean {
|
override val isRuntimeEditable: Boolean
|
||||||
return setting.isRuntimeEditable
|
get() = setting.isRuntimeEditable
|
||||||
}
|
|
||||||
|
|
||||||
override fun delete(settings: Settings): Boolean {
|
override fun delete(settings: Settings): Boolean {
|
||||||
return setting.delete(settings)
|
return setting.delete(settings)
|
||||||
|
|
Loading…
Reference in New Issue