00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 package de.picana.math;
00014
00015
00022 public class IntegerPair {
00023
00025 public int a;
00027 public int b;
00028
00034 public IntegerPair(int a, int b) {
00035 this.a = a;
00036 this.b = b;
00037 }
00038
00043 public int hashCode() {
00044 return (a+b)/2;
00045 }
00046
00054 public boolean equals(Object o) {
00055 if (!(o instanceof IntegerPair))
00056 return false;
00057
00058 IntegerPair pair = (IntegerPair)o;
00059
00060 if (((this.a == pair.a) && (this.b == pair.b)) ||
00061 (this.a == pair.b) && (this.b == pair.a))
00062
00063 return true;
00064 else
00065 return false;
00066 }
00067 }