www.pudn.com > dataswap.rar > NamePlace.java


package com.gemt.dataswap.bean; 
 
import java.io.Serializable; 
 
public class NamePlace implements Serializable { 
	 
	/** 
	 *  
	 */ 
	private static final long serialVersionUID = -3273260192054974777L; 
	private String name; 
	private int place; 
	 
	public NamePlace() { 
		 
	} 
	public NamePlace(String name, int place) { 
		this.name = name; 
		this.place = place; 
	} 
	public String getName() { 
		return name; 
	} 
	public void setName(String name) { 
		this.name = name; 
	} 
	public int getPlace() { 
		return place; 
	} 
	public void setPlace(int place) { 
		this.place = place; 
	} 
	@Override 
	public int hashCode() 
	{ 
		final int PRIME = 31; 
		int result = 1; 
		result = PRIME * result + ((name == null) ? 0 : name.hashCode()); 
		result = PRIME * result + place; 
		return result; 
	} 
	@Override 
	public boolean equals(Object obj) 
	{ 
		if (this == obj) 
			return true; 
		if (obj == null) 
			return false; 
		if (getClass() != obj.getClass()) 
			return false; 
		final NamePlace other = (NamePlace) obj; 
		if (name == null) 
		{ 
			if (other.name != null) 
				return false; 
		} 
		else if (!name.equals(other.name)) 
			return false; 
		if (place != other.place) 
			return false; 
		return true; 
	} 
	 
	 
	 
}