visidia.simulation.process.messages
Class StringMessage

java.lang.Object
  extended by visidia.simulation.process.messages.Message
      extended by visidia.simulation.process.messages.StringMessage
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class StringMessage
extends Message

This class represents a message containing a string.

See Also:
Serialized Form

Constructor Summary
StringMessage(java.lang.String data)
          Instantiates a new string message.
StringMessage(java.lang.String data, MessageType type)
          Instantiates a new string message.
 
Method Summary
 java.lang.Object clone()
          Gives a copy (a clone) of this object.
 java.lang.String data()
          Same as getData().
 java.lang.Object getData()
          Returns a String representation of data.
 java.lang.String toString()
          Returns a string representation of the message.
 
Methods inherited from class visidia.simulation.process.messages.Message
getMsgClock, getType, getVisualization, setMsgClock, setType, setVisualization
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringMessage

public StringMessage(java.lang.String data)
Instantiates a new string message.

Parameters:
data - the data

StringMessage

public StringMessage(java.lang.String data,
                     MessageType type)
Instantiates a new string message.

Parameters:
data - the data
type - the type
Method Detail

data

public java.lang.String data()
Same as getData().


clone

public java.lang.Object clone()
Description copied from class: Message
Gives a copy (a clone) of this object.

Specified by:
clone in class Message
Returns:
the object

getData

public java.lang.Object getData()
Returns a String representation of data.

Specified by:
getData in class Message
Returns:
the String representation

toString

public java.lang.String toString()
Description copied from class: Message
Returns a string representation of the message. This is used for the visualization. For the visualization, it is important to provide a nice implementation for the this.toString() method.

Specified by:
toString in class Message
Returns:
the string