public class RandomSizeDistribution extends java.lang.Object implements PacketSizeDistribution
| Constructor and Description |
|---|
RandomSizeDistribution()
Constructs a new RandomSizeDistribution with default maximum and minimum
packet size values.
|
RandomSizeDistribution(int upperOrLowerBound)
Constructs a RandomSizeDistribution with one default parameter, and a
specified minimum or maximum, depending upon the exact value specified.
|
RandomSizeDistribution(int bound1,
int bound2)
Constructs a new RandomSizeDistribution with the specified upper and
lower bounds on packet sizes.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getMaxSize() |
int |
getMinSize() |
int |
getType() |
int |
nextSize() |
void |
setMaxSize(int newMax) |
void |
setMinSize(int newMin) |
void |
setSizeBounds(int bound1,
int bound2) |
public RandomSizeDistribution()
public RandomSizeDistribution(int upperOrLowerBound)
upperOrLowerBound - the wanted minimum (if less than the default
minimum) or maximum (if greater than the default minimum) size for this
RandomSizeDistributionpublic RandomSizeDistribution(int bound1,
int bound2)
bound1 - the first bound (either min or max) on packet sizes, in
bytesbound2 - the second bound (either min or max) on packet sizes, in
bytespublic int getMinSize()
public void setMinSize(int newMin)
public int getMaxSize()
public void setMaxSize(int newMax)
public void setSizeBounds(int bound1,
int bound2)
public int getType()
getType in interface PacketSizeDistributionpublic int nextSize()
nextSize in interface PacketSizeDistribution