package org.mynonglam.entitys;

import org.apache.catalina.websocket.WsOutbound;

public class Client {
	private String username;
	private WsOutbound netOut;
	
	public Client(String username, WsOutbound netOut) {
		this.username = username;
		this.netOut = netOut;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public WsOutbound getNetOut() {
		return netOut;
	}

	public void setNetOut(WsOutbound netOut) {
		this.netOut = netOut;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((netOut == null) ? 0 : netOut.hashCode());
		result = prime * result
				+ ((username == null) ? 0 : username.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Client other = (Client) obj;
		if (netOut == null) {
			if (other.netOut != null)
				return false;
		} else if (!netOut.equals(other.netOut))
			return false;
		if (username == null) {
			if (other.username != null)
				return false;
		} else if (!username.equals(other.username))
			return false;
		return true;
	}
}
