jobpk.java
来自「21天学通J2EE的例子2」· Java 代码 · 共 43 行
JAVA
43 行
package data;
import java.io.*;
import javax.ejb.*;
public class JobPK implements Serializable
{
public String ref;
public String customer;
public JobPK() {
}
public JobPK(String ref, String customer) {
this.ref = ref;
this.customer = customer;
}
public String getRef() {
return ref;
}
public String getCustomer() {
return customer;
}
public boolean equals(Object obj) {
if (obj instanceof JobPK) {
JobPK pk = (JobPK)obj;
return (pk.ref.equals(ref) && pk.customer.equals(customer)) ;
}
return false ;
}
public int hashCode() {
return (ref.hashCode() ^ customer.hashCode());
}
public String toString() {
return "JobPK: ref=\"" + ref + "\", customer=\"" + customer + "\"";
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?