summaryrefslogtreecommitdiff
path: root/src/main/java/cuchaz/enigma/mapping/ArgumentMapping.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/cuchaz/enigma/mapping/ArgumentMapping.java')
-rw-r--r--src/main/java/cuchaz/enigma/mapping/ArgumentMapping.java50
1 files changed, 0 insertions, 50 deletions
diff --git a/src/main/java/cuchaz/enigma/mapping/ArgumentMapping.java b/src/main/java/cuchaz/enigma/mapping/ArgumentMapping.java
deleted file mode 100644
index 91ecd10..0000000
--- a/src/main/java/cuchaz/enigma/mapping/ArgumentMapping.java
+++ /dev/null
@@ -1,50 +0,0 @@
1/*******************************************************************************
2 * Copyright (c) 2015 Jeff Martin.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the GNU Lesser General Public
5 * License v3.0 which accompanies this distribution, and is available at
6 * http://www.gnu.org/licenses/lgpl.html
7 * <p>
8 * Contributors:
9 * Jeff Martin - initial API and implementation
10 ******************************************************************************/
11
12package cuchaz.enigma.mapping;
13
14public class ArgumentMapping implements Comparable<ArgumentMapping> {
15
16 private int index;
17 private String name;
18
19 // NOTE: this argument order is important for the MethodReader/MethodWriter
20 public ArgumentMapping(int index, String name) {
21 this.index = index;
22 this.name = NameValidator.validateArgumentName(name);
23 }
24
25 public ArgumentMapping(ArgumentMapping other) {
26 this.index = other.index;
27 this.name = other.name;
28 }
29
30 public int getIndex() {
31 return this.index;
32 }
33
34 public String getName() {
35 return this.name;
36 }
37
38 public void setName(String val) {
39 this.name = NameValidator.validateArgumentName(val);
40 }
41
42 public ArgumentEntry getObfEntry(BehaviorEntry behaviorEntry) {
43 return new ArgumentEntry(behaviorEntry, index, name);
44 }
45
46 @Override
47 public int compareTo(ArgumentMapping other) {
48 return Integer.compare(this.index, other.index);
49 }
50}