Added equals for Peer class.
This commit is contained in:
@@ -13,4 +13,8 @@ public record Peer(String ipAddress, int port, Map<String, String> filesMap, EOn
|
||||
filesMap.put(fileName, filePath);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean equals(Peer other) {
|
||||
return this.ipAddress.equals(other.ipAddress) && (this.port == other.port);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user