summaryrefslogtreecommitdiff
path: root/src/cuchaz/enigma/mapping/EntryPair.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/cuchaz/enigma/mapping/EntryPair.java')
-rw-r--r--src/cuchaz/enigma/mapping/EntryPair.java30
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 ******************************************************************************/
11package cuchaz.enigma.mapping; 11package cuchaz.enigma.mapping;
12 12
13import cuchaz.enigma.Util;
14 13
15public class EntryPair 14public 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}