⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 message.java

📁 ALGAE是一个快速创建算法演示的框架。目前支持的算法实现语言包括java和c
💻 JAVA
字号:
/** * Message.java * * * Created: Fri Apr 17 10:04:48 1998 * * @author Steven Zeil * @version */package edu.odu.cs.zeil.AlgAE;import java.util.Vector;import edu.odu.cs.zeil.AlgAE.MessageListener;public class Message {  private String messageKind;  private Vector listeners;    /**   *  Messages received from the algorithm (server) are queued up until   *  a forcing message is received.  Once the queue contains at least one   *  forcing message, the messages in the queue can be dispatched for   *  processing.  "Forcing" messages therefore represent the completion   *  of some visual change that is described using many messages but should   *  only be presented as a complete, atomic change to the visual picture.   */  private boolean msgIsForcing;      public Message(String theMessageKind, boolean forcing) {    messageKind = theMessageKind;    listeners = new Vector();    msgIsForcing = forcing;  }  /**   * Get the value of isForcing.   * @return Value of isForcing.   */  public boolean getIsForcing() {return msgIsForcing;}  /**   * Get the value of isForcing.   * @return Value of isForcing.   */  public boolean isForcing() {return msgIsForcing;}    /**   * Set the value of isForcing.   * @param v  Value to assign to isForcing.   */  public void setIsForcing(boolean  v) {msgIsForcing = v;}  /**   * Get the value of messageKind.   * @return Value of messageKind.   */  public String getMessageKind() {return messageKind;}      public void addMessageListener (MessageListener msgListener)  {    listeners.addElement(msgListener);  }  public void received (Vector params)  {    invokeListeners (params);  }  void invokeListeners (Vector params)  {    for (int i = 0; i < listeners.size(); ++i)      {	MessageListener msgl = (MessageListener)(listeners.elementAt(i));	msgl.messageReceived (messageKind, params);      }  }} // Message

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -