@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj instanceof MsgHead) { MsgHead m = (MsgHead) obj; if (m.getCmdCode().equals(cmdCode)) { return true; } } return false; }
public MsgHead clone() { MsgHead cloneMsgHead = new MsgHead(); cloneMsgHead.setCmdCode(cmdCode); cloneMsgHead.setErrorCode(errorCode); cloneMsgHead.setFromID(fromID); cloneMsgHead.setFromType(fromType); cloneMsgHead.setMsgSequense(msgSequense); cloneMsgHead.setMsgType(msgType); cloneMsgHead.setPriority(priority); cloneMsgHead.setSizeOfMsgBody(sizeOfMsgBody); cloneMsgHead.setToID(toID); cloneMsgHead.setToType(toType); cloneMsgHead.setUserSequense(userSequense); return cloneMsgHead; }