summaryrefslogtreecommitdiff
path: root/Source/Android/app/src/main/java/org
diff options
context:
space:
mode:
authorCharles Lombardo <clombardo169@gmail.com>2023-03-01 13:37:57 -0500
committerCharles Lombardo <clombardo169@gmail.com>2023-03-01 13:37:57 -0500
commitcacbac9152595fb53d27201c7e059a76267b0a39 (patch)
tree997fc72a304e9fddb3a0462d9b12808d3c8f4b4c /Source/Android/app/src/main/java/org
parent5f5c95e7dab040ead159c155e03e9ac3342a50f1 (diff)
Android: Convert CheatItem to Kotlin
Diffstat (limited to 'Source/Android/app/src/main/java/org')
-rw-r--r--Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/cheats/ui/CheatItem.java49
-rw-r--r--Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/cheats/ui/CheatItem.kt29
2 files changed, 29 insertions, 49 deletions
diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/cheats/ui/CheatItem.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/cheats/ui/CheatItem.java
deleted file mode 100644
index b293cd84d1..0000000000
--- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/cheats/ui/CheatItem.java
+++ /dev/null
@@ -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;
- }
-}
diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/cheats/ui/CheatItem.kt b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/cheats/ui/CheatItem.kt
new file mode 100644
index 0000000000..55b13a5be5
--- /dev/null
+++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/cheats/ui/CheatItem.kt
@@ -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
+ }
+}