From 44d7b3703ff97650916eda652aa11d4ffeded4b1 Mon Sep 17 00:00:00 2001 From: Graham Date: Sun, 22 Dec 2019 22:14:28 +0000 Subject: [PATCH] Convert ArgRef to Kotlin --- .../main/java/dev/openrs2/deob/ArgRef.java | 42 ------------------- deob/src/main/java/dev/openrs2/deob/ArgRef.kt | 6 +++ 2 files changed, 6 insertions(+), 42 deletions(-) delete mode 100644 deob/src/main/java/dev/openrs2/deob/ArgRef.java create mode 100644 deob/src/main/java/dev/openrs2/deob/ArgRef.kt diff --git a/deob/src/main/java/dev/openrs2/deob/ArgRef.java b/deob/src/main/java/dev/openrs2/deob/ArgRef.java deleted file mode 100644 index e4fc98f8..00000000 --- a/deob/src/main/java/dev/openrs2/deob/ArgRef.java +++ /dev/null @@ -1,42 +0,0 @@ -package dev.openrs2.deob; - -import java.util.Objects; - -import dev.openrs2.asm.MemberRef; -import dev.openrs2.util.collect.DisjointSet; - -public final class ArgRef { - private final DisjointSet.Partition method; - private final int arg; - - public ArgRef(DisjointSet.Partition method, int arg) { - this.method = method; - this.arg = arg; - } - - public DisjointSet.Partition getMethod() { - return method; - } - - public int getArg() { - return arg; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArgRef argRef = (ArgRef) o; - return arg == argRef.arg && - method.equals(argRef.method); - } - - @Override - public int hashCode() { - return Objects.hash(method, arg); - } -} diff --git a/deob/src/main/java/dev/openrs2/deob/ArgRef.kt b/deob/src/main/java/dev/openrs2/deob/ArgRef.kt new file mode 100644 index 00000000..5fb39aa2 --- /dev/null +++ b/deob/src/main/java/dev/openrs2/deob/ArgRef.kt @@ -0,0 +1,6 @@ +package dev.openrs2.deob + +import dev.openrs2.asm.MemberRef +import dev.openrs2.util.collect.DisjointSet + +data class ArgRef(val method: DisjointSet.Partition, val arg: Int)