Message.java
01 /**
02  *
03  * All content copyright (c) 2003-2008 Terracotta, Inc.,
04  * except as may otherwise be noted in a separate copyright notice.
05  * All rights reserved.
06  *
07  */
08 package demo.chatter;
09 
10 /**
11  *  Description of the Class
12  *
13  *@author    Terracotta, Inc.
14  */
15 class Message {
16    private final String text;
17    private final User user;
18    private final boolean alreadyDisplayedLocally;
19 
20    public Message(User user, String text, boolean displayed) {
21       this.user = user;
22       this.text = text;
23       this.alreadyDisplayedLocally = displayed;
24    }
25 
26    public String getText() {
27       return text;
28    }
29 
30    public User getUser() {
31       return user;
32    }
33 
34    public boolean wasAlreadyDisplayedLocally() {
35       return alreadyDisplayedLocally;
36    }
37 }