33 lines
480 B
Java
33 lines
480 B
Java
package chat;
|
|
|
|
import java.io.*;
|
|
import java.util.*;
|
|
|
|
public class Message implements Serializable{
|
|
|
|
private String text;
|
|
private String author;
|
|
|
|
public Message(String in_author, String in_text)
|
|
{
|
|
text = in_text;
|
|
author = in_author;
|
|
}
|
|
public void setText(String new_text)
|
|
{
|
|
text = new_text;
|
|
}
|
|
public String getText()
|
|
{
|
|
return text;
|
|
}
|
|
public void setAuthor(String new_author)
|
|
{
|
|
author = new_author;
|
|
}
|
|
public String getAuthor()
|
|
{
|
|
return author;
|
|
}
|
|
}
|
|
|