Hauptseite   Packages   Klassenhierarchie   ?bersicht   Auflistung der Dateien   Datenstruktur-Elemente  

IntegerPair.java

gehe zur Dokumentation dieser Datei
00001 /*
00002  * $Source: /shared/cvsroot/diplom/app/src/java/de/picana/math/IntegerPair.java,v $
00003  * $Author: mstolpe $
00004  * $Date: 2003/04/22 09:51:29 $
00005  * $Revision: 1.2 $
00006  * $Release$
00007  *
00008  * Created on 28. November, 18:18
00009  *
00010  * Copyright 2002 by Marco Stolpe
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 }

Erzeugt am Tue Apr 22 11:22:56 2003 f?r Picana von doxygen1.2.18