diff options
| author | 2014-08-03 11:16:33 -0400 | |
|---|---|---|
| committer | 2014-08-03 11:16:33 -0400 | |
| commit | 76be350b3c54ea88cc1a95b5cf0d1db153f2edb3 (patch) | |
| tree | 91baffda41c4fcdcc69c646287e98d6d2a0f80d6 /src/cuchaz/enigma/mapping/EntryPair.java | |
| parent | started working on method parameter renaming (diff) | |
| download | enigma-fork-76be350b3c54ea88cc1a95b5cf0d1db153f2edb3.tar.gz enigma-fork-76be350b3c54ea88cc1a95b5cf0d1db153f2edb3.tar.xz enigma-fork-76be350b3c54ea88cc1a95b5cf0d1db153f2edb3.zip | |
fixed bugs with saving mappings
got argument renaming to work
Diffstat (limited to 'src/cuchaz/enigma/mapping/EntryPair.java')
| -rw-r--r-- | src/cuchaz/enigma/mapping/EntryPair.java | 30 |
1 files changed, 4 insertions, 26 deletions
diff --git a/src/cuchaz/enigma/mapping/EntryPair.java b/src/cuchaz/enigma/mapping/EntryPair.java index e40e999..e3325b3 100644 --- a/src/cuchaz/enigma/mapping/EntryPair.java +++ b/src/cuchaz/enigma/mapping/EntryPair.java | |||
| @@ -10,37 +10,15 @@ | |||
| 10 | ******************************************************************************/ | 10 | ******************************************************************************/ |
| 11 | package cuchaz.enigma.mapping; | 11 | package cuchaz.enigma.mapping; |
| 12 | 12 | ||
| 13 | import cuchaz.enigma.Util; | ||
| 14 | 13 | ||
| 15 | public class EntryPair | 14 | public class EntryPair<T extends Entry> |
| 16 | { | 15 | { |
| 17 | public Entry obf; | 16 | public T obf; |
| 18 | public Entry deobf; | 17 | public T deobf; |
| 19 | 18 | ||
| 20 | public EntryPair( Entry obf, Entry deobf ) | 19 | public EntryPair( T obf, T deobf ) |
| 21 | { | 20 | { |
| 22 | this.obf = obf; | 21 | this.obf = obf; |
| 23 | this.deobf = deobf; | 22 | this.deobf = deobf; |
| 24 | } | 23 | } |
| 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 | } | 24 | } |