viceroy
Class MessagePath

java.lang.Object
  |
  +--viceroy.MessagePath
All Implemented Interfaces:
java.io.Serializable

public class MessagePath
extends java.lang.Object
implements java.io.Serializable

Represents a path that a message passes over its lifetime

Since:
1.6
Author:
Anat Talmy
, Oren Dobzinski
See Also:
Serialized Form

Field Summary
private  java.util.List path
          Holds the actual path.
 
Constructor Summary
MessagePath()
          Creates a new empty path
MessagePath(MessageStatistics first)
          Creates a new path, with the given element as the first one
 
Method Summary
 void addPointToPath(MessageStatistics stats)
          Adds the given point to the path, making it the last point added
 MessageStatistics getLastInPath()
          Gets the last element in the path.
 java.util.List getPath()
          Returns a view of the path elements.
 java.lang.String toString()
          toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

path

private java.util.List path
Holds the actual path. elements are MessageStatistics objects

Constructor Detail

MessagePath

public MessagePath()
Creates a new empty path


MessagePath

public MessagePath(MessageStatistics first)
Creates a new path, with the given element as the first one

Parameters:
first - the first element in path
Method Detail

addPointToPath

public void addPointToPath(MessageStatistics stats)
                    throws java.lang.IllegalArgumentException
Adds the given point to the path, making it the last point added

Parameters:
stats - the given point to add
java.lang.IllegalArgumentException

getPath

public java.util.List getPath()
Returns a view of the path elements. Consists of MessageStatistics objects.

Returns:
a view of the path elements. Consists of MessageStatistics objects

getLastInPath

public MessageStatistics getLastInPath()
Gets the last element in the path. At the end of the lookup, it will get the answer for it.

Returns:
the last element in the path. At the end of the lookup, it will get the answer for it.

toString

public java.lang.String toString()
toString

Overrides:
toString in class java.lang.Object
Returns: