geofot96 / StudyBuddy

2 stars 5 forks source link

[Feature Branch] Friends backend #184

Closed gessfred closed 5 years ago

gessfred commented 5 years ago

31

Notes: Buddy class is Database friendly and is basically a Pair with a creation date. The method buddyOf returns a Nullable because Java 8 Optionnal's are not available in this project. Because the hash function used is symmetric we can just push the database and be confident that there will be no doublons, we might override a friendship(change the date), but this is fine.

The reason why the hash function should be symmetric is that we would like arbitrary constant access to a particular location in the buddies table.