public class RegularTimeDistribution extends java.lang.Object implements PacketTimeDistribution
| Constructor and Description |
|---|
RegularTimeDistribution()
Constructs a new RegularTimeDistribution with a default interval.
|
RegularTimeDistribution(int interval)
Constructs a new RegularTimeDistribution with the specified interval.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getInterval() |
int |
getType() |
int |
nextInterval()
Since a RegularTimeDistribution describes evenly spaced packets, this
method simply returns the value of this RegularTimeDistribution's
interval.
|
int[] |
prediction(int size)
Generates an array containing predicted packet transmission times, in
terms of number of ms from this instant.
|
void |
setInterval(int newInterval)
If the interval specified is a valid interval (greater than 0), sets the
value of interval to newInterval.
|
public RegularTimeDistribution()
public RegularTimeDistribution(int interval)
public int getInterval()
public void setInterval(int newInterval)
newInterval - the new value for intervalpublic int getType()
getType in interface PacketTimeDistributionpublic int nextInterval()
nextInterval in interface PacketTimeDistributionpublic int[] prediction(int size)
PacketTimeDistributionprediction in interface PacketTimeDistributionsize - the number of predictions contained in the returned array