-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAddFriend.java
More file actions
35 lines (31 loc) · 911 Bytes
/
AddFriend.java
File metadata and controls
35 lines (31 loc) · 911 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import java.io.Serializable;
/**
* A message used by a Client to notify the
* Client Proxy that the logged in user has
* added a friend. The message stores the added
* friend's account upon instantiation and provides
* a method for the server to get said account.
*
* @version %I%, %G%
*/
public class AddFriend implements Serializable {
private Account friendToBeAdded;
/**
* Initialize a new message regarding friend addition.
*
* @param friendToBeAdded the account of the user
* who is to be befriended.
*/
public AddFriend(Account friendToBeAdded) {
this.friendToBeAdded = friendToBeAdded;
}
/**
* Get a reference to the account of the user who
* the message indicates has been added.
*
* @return the account of the added friend.
*/
public Account getFriend() {
return this.friendToBeAdded;
}
}