Added equals for Peer class.

This commit is contained in:
WickedJack99
2024-04-06 21:54:14 +02:00
parent b8b4407590
commit bd63dc96e1

View File

@@ -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);
}
}