visidia.simulation.process.messages
Class NeighborMessage

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

public class NeighborMessage
extends Message

This class represents information (label, mark) about a neighbor.

See Also:
Serialized Form

Constructor Summary
NeighborMessage(Neighbor n)
          Instantiates a new neighbor message.
NeighborMessage(Neighbor n, MessageType t)
          Instantiates a new neighbor message.
NeighborMessage(java.lang.String l, boolean b)
          Instantiates a new neighbor message.
 
Method Summary
 java.lang.Object clone()
          Gives a copy (a clone) of this object.
 java.lang.Object getData()
          the returned object is a clone of this message.
 Neighbor getNeighbour()
          Gets the neighbor.
 java.lang.String label()
          Label.
 boolean mark()
          Mark.
 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

NeighborMessage

public NeighborMessage(java.lang.String l,
                       boolean b)
Instantiates a new neighbor message.

Parameters:
l - the label
b - the mark

NeighborMessage

public NeighborMessage(Neighbor n)
Instantiates a new neighbor message.

Parameters:
n - the neighbor

NeighborMessage

public NeighborMessage(Neighbor n,
                       MessageType t)
Instantiates a new neighbor message.

Parameters:
n - the neighbor
t - the message type
Method Detail

mark

public boolean mark()
Mark.

Returns:
true, if successful

label

public java.lang.String label()
Label.

Returns:
the string

getNeighbour

public Neighbor getNeighbour()
Gets the neighbor.

Returns:
the neighbor

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()
the returned object is a clone of this message.

Specified by:
getData in class Message
Returns:
the data

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