package jp.hasc.hupserver;

import java.net.InetAddress;

public class InetAddrAndPort {
	InetAddress ia_;
	int port_;
	
	public InetAddrAndPort(InetAddress ia, int pt){
		ia_ = ia;
		port_ = pt;
	}
	
	
	@Override
	public int hashCode() {
		return ia_.hashCode()*2+port_*3;
	}


	@Override
	public boolean equals(Object obj) {
		InetAddrAndPort iaap = (InetAddrAndPort)obj;
		if(iaap.port_ == port_ && ia_.equals(iaap.ia_)) return true;
		return false;
	}	
}
