diff options
| author | 2014-07-27 22:33:21 -0400 | |
|---|---|---|
| committer | 2014-07-27 22:33:21 -0400 | |
| commit | d7321b5b0d38c575e54c770f7aa18dacbacab3c8 (patch) | |
| tree | ef4b3e0f83b1fe89125c2674fec023871e70c0d8 /src/cuchaz/enigma/mapping/EntryPair.java | |
| parent | made gui responsive to caret position and show identifier info (diff) | |
| download | enigma-fork-d7321b5b0d38c575e54c770f7aa18dacbacab3c8.tar.gz enigma-fork-d7321b5b0d38c575e54c770f7aa18dacbacab3c8.tar.xz enigma-fork-d7321b5b0d38c575e54c770f7aa18dacbacab3c8.zip | |
added identifier renaming capability
copied some code over from M3L to handle the heavy bytecode magic.
It's ok... M3L will eventually depend on Enigma.
Completely restructured the mappings though. This way is better. =)
Diffstat (limited to 'src/cuchaz/enigma/mapping/EntryPair.java')
| -rw-r--r-- | src/cuchaz/enigma/mapping/EntryPair.java | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/cuchaz/enigma/mapping/EntryPair.java b/src/cuchaz/enigma/mapping/EntryPair.java new file mode 100644 index 0000000..e40e999 --- /dev/null +++ b/src/cuchaz/enigma/mapping/EntryPair.java | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | /******************************************************************************* | ||
| 2 | * Copyright (c) 2014 Jeff Martin. | ||
| 3 | * All rights reserved. This program and the accompanying materials | ||
| 4 | * are made available under the terms of the GNU Public License v3.0 | ||
| 5 | * which accompanies this distribution, and is available at | ||
| 6 | * http://www.gnu.org/licenses/gpl.html | ||
| 7 | * | ||
| 8 | * Contributors: | ||
| 9 | * Jeff Martin - initial API and implementation | ||
| 10 | ******************************************************************************/ | ||
| 11 | package cuchaz.enigma.mapping; | ||
| 12 | |||
| 13 | import cuchaz.enigma.Util; | ||
| 14 | |||
| 15 | public class EntryPair | ||
| 16 | { | ||
| 17 | public Entry obf; | ||
| 18 | public Entry deobf; | ||
| 19 | |||
| 20 | public EntryPair( Entry obf, Entry deobf ) | ||
| 21 | { | ||
| 22 | this.obf = obf; | ||
| 23 | this.deobf = deobf; | ||
| 24 | } | ||
| 25 | |||
| 26 | @Override | ||
| 27 | public int hashCode( ) | ||
| 28 | { | ||
| 29 | return Util.combineHashesOrdered( obf, deobf ); | ||
| 30 | } | ||
| 31 | |||
| 32 | @Override | ||
| 33 | public boolean equals( Object other ) | ||
| 34 | { | ||
| 35 | if( other instanceof EntryPair ) | ||
| 36 | { | ||
| 37 | return equals( (EntryPair)other ); | ||
| 38 | } | ||
| 39 | return false; | ||
| 40 | } | ||
| 41 | |||
| 42 | public boolean equals( EntryPair other ) | ||
| 43 | { | ||
| 44 | return obf.equals( other.obf ) && deobf.equals( other.deobf ); | ||
| 45 | } | ||
| 46 | } | ||