-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOutbox.java
More file actions
52 lines (39 loc) · 957 Bytes
/
Outbox.java
File metadata and controls
52 lines (39 loc) · 957 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//DO_NOT_EDIT_ANYTHING_ABOVE_THIS_LINE
package boxes;
import java.util.LinkedList;
import java.util.Queue;
import elements.Message;
import elements.User;
/**
* Represents an outbox.
* @author leylayayladere
* @version 1.0
*/
public class Outbox extends Box {
/**
* Keeps track of all messages which are sent.
*/
private Queue<Message> sent = new LinkedList<Message>();
/**
* Creates a <code>Outbox</code> with specified <code>owner</code>.
* @param owner <code>User</code> of this <code>Outbox</code>.
*/
public Outbox(User owner) {
super(owner);
}
/**
* Retrieves the value of a <code>sent</code> <i>queue<i>.
* @return A queue data type.
*/
public Queue<Message> getSent() {
return sent;
}
/**
* Sets the value of a <code>sent</code> <i>queue<i>.
* @param sent A variable of type queue.
*/
public void setSent(Queue<Message> sent) {
this.sent = sent;
}
}
//DO_NOT_EDIT_ANYTHING_BELOW_THIS_LINE