KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > jtests > beans > relation > lcp > SIMPLEPARENTPK


1 package org.objectweb.jonas.jtests.beans.relation.lcp;
2
3
4 public class SIMPLEPARENTPK implements java.io.Serializable JavaDoc {
5
6     // Variables
7
public String JavaDoc spPkId;
8
9     // Methods
10
public int hashCode() {
11         return spPkId.hashCode();
12     }
13
14     public String JavaDoc toString() {
15         return "" + spPkId;
16     }
17
18     public boolean equals(Object JavaDoc obj) {
19         if (obj == null || !(obj instanceof SIMPLEPARENTPK)) {
20             return false;
21         } else if (((SIMPLEPARENTPK) obj).spPkId.equals(this.spPkId)) {
22             return true;
23         } else {
24             return false;
25         }
26     }
27
28 }
29
Popular Tags