package owltools.sim2;

import org.semanticweb.owlapi.model.OWLClassExpression;

public class ClassExpressionPair {
	public OWLClassExpression c1;
	public OWLClassExpression c2;
	public ClassExpressionPair(OWLClassExpression c1,
			OWLClassExpression c2) {
		super();
		this.c1 = c1;
		this.c2 = c2;
	}
	public int hashCode() {
		int n1 = c1.hashCode();
		int n2 = c2.hashCode();

		return (n1 + n2) * n2 + n1;
	}
	public boolean equals(Object other) {
		if (other instanceof ClassExpressionPair) {
			ClassExpressionPair otherPair = (ClassExpressionPair) other;
			return this.c1 == otherPair.c1 && this.c2 == otherPair.c2;
		}

		return false;
	}

}
@@ -171,16 +171,18 @@
 ion c2;%0A
+%09%0A
 %09public 
@@ -223,20 +223,17 @@
 sion c1,
-%0A%09%09%09
+ 
 OWLClass
@@ -291,24 +291,37 @@
 c2 = c2;%0A%09%7D%0A
+%09%0A%09@Override%0A
 %09public int 
@@ -339,16 +339,95 @@
 %7B%0A%09%09
-int n1 =
+final int prime = 31;%0A%09%09int result = 1;%0A%09%09result = prime * result + ((c1 == null) ? 0 :
  c1.
@@ -440,20 +440,58 @@
 de()
+)
 ;%0A%09%09
-int n
+result = prime * result + ((c
 2 =
+=
+ null) ? 0 :
  c2.
@@ -500,18 +500,18 @@
 shCode()
+)
 ;
-%0A
 %0A%09%09retur
@@ -516,31 +516,31 @@
 urn 
-(n1 + n2) * n2 + n1;%0A%09%7D
+result;%0A%09%7D%0A%09%0A%09@Override
 %0A%09pu
@@ -567,20 +567,18 @@
 Object o
-ther
+bj
 ) %7B%0A%09%09if
@@ -583,49 +583,126 @@
 if (
-o
 th
-er instanceof ClassExpressionPair) %7B%0A%09
+is == obj)%0A%09%09%09return true;%0A%09%09if (obj == null)%0A%09%09%09return false;%0A%09%09if (getClass() != obj.getClass())%0A%09%09%09return false;%0A
 %09%09Cl
@@ -724,20 +724,16 @@
 ir other
-Pair
  = (Clas
@@ -754,94 +754,254 @@
 r) o
-ther;%0A%09%09%09return this.c1 == otherPair.c1 && this.c2 == otherPair.c2;%0A%09%09%7D%0A%0A%09%09return fals
+bj;%0A%09%09if (c1 == null) %7B%0A%09%09%09if (other.c1 != null)%0A%09%09%09%09return false;%0A%09%09%7D else if (!c1.equals(other.c1))%0A%09%09%09return false;%0A%09%09if (c2 == null) %7B%0A%09%09%09if (other.c2 != null)%0A%09%09%09%09return false;%0A%09%09%7D else if (!c2.equals(other.c2))%0A%09%09%09return false;%0A%09%09return tru
 e;%0A%09

use auto-generated hashcode and equals methods