mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 13:27:45 -07:00
Android: Convert CheatItem to Kotlin
This commit is contained in:
parent
5f5c95e7da
commit
cacbac9152
@ -1,49 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.dolphinemu.dolphinemu.features.cheats.ui;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import org.dolphinemu.dolphinemu.features.cheats.model.Cheat;
|
||||
|
||||
public class CheatItem
|
||||
{
|
||||
public static final int TYPE_CHEAT = 0;
|
||||
public static final int TYPE_HEADER = 1;
|
||||
public static final int TYPE_ACTION = 2;
|
||||
|
||||
private final @Nullable Cheat mCheat;
|
||||
private final int mString;
|
||||
private final int mType;
|
||||
|
||||
public CheatItem(@NonNull Cheat cheat)
|
||||
{
|
||||
mCheat = cheat;
|
||||
mString = 0;
|
||||
mType = TYPE_CHEAT;
|
||||
}
|
||||
|
||||
public CheatItem(int type, int string)
|
||||
{
|
||||
mCheat = null;
|
||||
mString = string;
|
||||
mType = type;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Cheat getCheat()
|
||||
{
|
||||
return mCheat;
|
||||
}
|
||||
|
||||
public int getString()
|
||||
{
|
||||
return mString;
|
||||
}
|
||||
|
||||
public int getType()
|
||||
{
|
||||
return mType;
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.dolphinemu.dolphinemu.features.cheats.ui
|
||||
|
||||
import org.dolphinemu.dolphinemu.features.cheats.model.Cheat
|
||||
|
||||
class CheatItem {
|
||||
val cheat: Cheat?
|
||||
val string: Int
|
||||
val type: Int
|
||||
|
||||
constructor(cheat: Cheat) {
|
||||
this.cheat = cheat
|
||||
string = 0
|
||||
type = TYPE_CHEAT
|
||||
}
|
||||
|
||||
constructor(type: Int, string: Int) {
|
||||
cheat = null
|
||||
this.string = string
|
||||
this.type = type
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val TYPE_CHEAT = 0
|
||||
const val TYPE_HEADER = 1
|
||||
const val TYPE_ACTION = 2
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user