Compare commits

..

2 commits

Author SHA1 Message Date
LMAGallois
9a77e9149b bdd 2020-12-15 16:06:11 +01:00
LMAGallois
bd18c668e8 bdd 2020-12-15 15:55:31 +01:00

View file

@ -4,6 +4,24 @@ import java.net.*;
public abstract class User {
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
User other = (User) obj;
if (addIP == null) {
if (other.addIP != null)
return false;
} else if (!addIP.equals(other.addIP))
return false;
if (portTCP != other.portTCP)
return false;
return true;
}
/*** ATTRIBUTS ***/
protected String pseudo;
protected InetAddress addIP;