visidia.simulation.process.messages
Class IntegerMessage

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

public class IntegerMessage
extends Message

This class represents a message containing an integer.

See Also:
Serialized Form

Constructor Summary
IntegerMessage(int data)
          Instantiates a new integer message.
IntegerMessage(java.lang.Integer data)
          Instantiates a new integer message.
IntegerMessage(java.lang.Integer data, MessageType type)
          Instantiates a new integer message.
IntegerMessage(int data, MessageType type)
          Instantiates a new integer message.
 
Method Summary
 java.lang.Object clone()
          Gives a copy (a clone) of this object.
 java.lang.Integer data()
          Same as getData().
 java.lang.Integer getData()
          Returns an Integer representation of data using : new Integer(data).
 java.lang.String toString()
          Returns a string representation of the message.
 int value()
          Return an int representation of data.
 
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

IntegerMessage

public IntegerMessage(java.lang.Integer data)
Instantiates a new integer message.

Parameters:
data - the data

IntegerMessage

public IntegerMessage(int data)
Instantiates a new integer message.

Parameters:
data - the data

IntegerMessage

public IntegerMessage(java.lang.Integer data,
                      MessageType type)
Instantiates a new integer message.

Parameters:
data - the data
type - the type

IntegerMessage

public IntegerMessage(int data,
                      MessageType type)
Instantiates a new integer message.

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

value

public int value()
Return an int representation of data.

Returns:
the int representation

data

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


getData

public java.lang.Integer getData()
Returns an Integer representation of data using : new Integer(data).

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

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

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