KickJava   Java API By Example, From Geeks To Geeks.

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


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