|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.colorado.cs.ns2.animation.TimeLine
public class TimeLine
This class is used to represent discrete events in the simulation as a time line. It stores the time of the event, co-ordinates, and packet size for animation. @see Comparable
Field Summary | |
---|---|
private int |
packetSize
The size of the packet within the event. |
private int |
time
Store the logical time of the discrete event (not the real clock time). |
private int |
X
The X-coordinate. |
private int |
Y
The Y-coordinate. |
Constructor Summary | |
---|---|
TimeLine(int time,
int x,
int y)
Three-argument constructor. |
Method Summary | |
---|---|
int |
compareTo(java.lang.Object o)
Compares two TimeLine Objects by the time field. |
int |
getPacketSize()
Get the Size of Packet for this Event. |
int |
getTime()
Get the time in ms for the event. |
int |
getX()
Get x co-ordinate of the packet to be displayed. |
int |
getY()
Get y co-ordinate of the packet to be displayed. |
void |
setPacketSize(int packetSize)
Set the size of the packet for this Event. |
java.lang.String |
toString()
Returns a String representation of a TimeLine Object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private int time
private int X
private int Y
private int packetSize
Constructor Detail |
---|
public TimeLine(int time, int x, int y)
time
- Stores the logical time of the discrete event.x
- Stores the X-coordinate.y
- Stores the Y-coordinate.Method Detail |
---|
public int getTime()
public int getX()
public int getY()
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
o
- The Object that is compared to the current object.
public java.lang.String toString()
toString
in class java.lang.Object
public int getPacketSize()
public void setPacketSize(int packetSize)
The
- event's packet size.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |