KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > test > collection > Email


1 //$Id: Email.java,v 1.2 2005/02/12 07:27:21 steveebersole Exp $
2
package org.hibernate.test.collection;
3
4 /**
5  * @author Gavin King
6  */

7 public class Email {
8     private String JavaDoc address;
9     Email() {}
10     public String JavaDoc getAddress() {
11         return address;
12     }
13     public void setAddress(String JavaDoc type) {
14         this.address = type;
15     }
16     public Email(String JavaDoc type) {
17         this.address = type;
18     }
19     public boolean equals(Object JavaDoc that) {
20         if ( !(that instanceof Email) ) return false;
21         Email p = (Email) that;
22         return this.address.equals(p.address);
23     }
24     public int hashCode() {
25         return address.hashCode();
26     }
27 }
28
Popular Tags