public class TrafficMatrixSequence extends Object implements Iterable<TrafficMatrix>
Constructor and Description |
---|
TrafficMatrixSequence()
Constructor
|
TrafficMatrixSequence(int interval,
String timeUnit)
Contructor
|
Modifier and Type | Method and Description |
---|---|
void |
addMatrix(int index,
TrafficMatrix trafficMatrix)
Add a traffic matrix in a specific position of the sequence
|
void |
addMatrix(TrafficMatrix trafficMatrix)
Append a matrix to the end of the sequence
|
int |
getInterval()
Return the time interval between subsequent matrices
|
TrafficMatrix |
getMatrix(int index)
Return the traffic matrix in a specific point of he sequence
|
String |
getTimeUnit()
Return the unit of time
|
Iterator<TrafficMatrix> |
iterator()
Return an iterator over the matrices of the sequence
|
void |
removeMatrix(int index)
Remove the traffic matrix in a specific position from the sequence
|
void |
removeMatrix(TrafficMatrix trafficMatrix)
Remove the specified traffic matrix from the sequence
|
void |
setInterval(int interval)
Set the time interval between subsequent matrices
|
void |
setTimeUnit(String timeUnit)
Set the unit of time
|
int |
size()
Return the number of traffic matrices in the sequence
|
public TrafficMatrixSequence()
public TrafficMatrixSequence(int interval, String timeUnit)
interval
- The time interval between subsequent traffic matricestimeUnit
- The unit of time of the interval valuepublic int size()
public String getTimeUnit()
public void setTimeUnit(String timeUnit)
timeUnit
- the time unit to setpublic int getInterval()
public void setInterval(int interval)
interval
- the interval to setpublic void addMatrix(TrafficMatrix trafficMatrix)
trafficMatrix
- the traffic matrix to addpublic void addMatrix(int index, TrafficMatrix trafficMatrix)
index
- the position in the sequencetrafficMatrix
- the traffic matrix to addpublic void removeMatrix(TrafficMatrix trafficMatrix)
trafficMatrix
- the matrix to removepublic void removeMatrix(int index)
index
- the index of the matrix to removedpublic TrafficMatrix getMatrix(int index)
index
- The index of the matrixpublic Iterator<TrafficMatrix> iterator()
iterator
in interface Iterable<TrafficMatrix>