易个message

源代码在线查看: message.java

软件大小: 2 K
上传用户: jackjinke
关键词: message
下载地址: 免注册下载 普通下载 VIP

相关代码

				/*				 * /home/grant/Teaching/COMP213/New/Slides/Code/Message.java				 *				 * Created: Tue Oct  7 15:03:10 2008				 *				 * copyright Grant Malcolm				 *				 *   This source code may be freely used, modified, or distributed				 *   provided due credit is given.				 *				 */								// package Comp213.MessageBoard.V1;								/**				 * This class represents messages for a simple Message Board server.				 * Messages consist of two strings: one representing the name of the poster;				 * the other being the text of the message.				 *				 *				 * @author Grant Malcolm				 * @version 1.0				 */				public class Message 				{								   /**				    * The name of the poster who sent the message.				    *				    */				   private final String sender;								   /**				    * The text of the message.				    *				    */				   private final String text;								   /**				    * Creates a new Message instance with the given data.				    *				    * @param s the name of the poster				    * @param t the text of the message				    */				   public Message(String s, String t)				   {				      sender = s;				      text = t;				   }								   /**				    * Return the name of the sender of the message.				    *				    * @return the name of the poster who sent the message				    */				   public String getSender()				   {				      return sender;				   }								   /**				    * Return the text of the message.				    *				    * @return the text of the message				    */				   public String getText()				   {				      return text;				   }								}							

相关资源