morestuff.java

来自「用Java实现的23个常用设计模式源代码」· Java 代码 · 共 93 行

JAVA
93
字号
//$Id: MoreStuff.java,v 1.1.2.1 2003/11/08 02:25:29 oneovthafew Exp $package org.hibernate.test;import java.io.Serializable;import java.util.Collection;public class MoreStuff implements Serializable {	private String stringId;	private int intId;	private Collection stuffs;	private String name;		public boolean equals(Object other) {		return ( (MoreStuff) other ).getIntId()==intId && ( (MoreStuff) other ).getStringId().equals(stringId);	}		public int hashCode() {		return stringId.hashCode();	}		/**	 * Returns the stuffs.	 * @return Collection	 */	public Collection getStuffs() {		return stuffs;	}		/**	 * Sets the stuffs.	 * @param stuffs The stuffs to set	 */	public void setStuffs(Collection stuffs) {		this.stuffs = stuffs;	}		/**	 * Returns the name.	 * @return String	 */	public String getName() {		return name;	}		/**	 * Sets the name.	 * @param name The name to set	 */	public void setName(String name) {		this.name = name;	}		/**	 * Returns the intId.	 * @return int	 */	public int getIntId() {		return intId;	}		/**	 * Returns the stringId.	 * @return String	 */	public String getStringId() {		return stringId;	}		/**	 * Sets the intId.	 * @param intId The intId to set	 */	public void setIntId(int intId) {		this.intId = intId;	}		/**	 * Sets the stringId.	 * @param stringId The stringId to set	 */	public void setStringId(String stringId) {		this.stringId = stringId;	}	}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?