Compare commits
2 commits
601e040edd
...
9a77e9149b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9a77e9149b | ||
|
|
bd18c668e8 |
1 changed files with 18 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue