|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectumontreal.iro.lecuyer.contactcenters.app.CallTraceSorter
public class CallTraceSorter
Reads a call trace produced by a call center simulator using simulation
parameters from an instance of SimParams
, sorts the calls by
increasing arrival time, and writes the sorted trace into a file.
Nested Class Summary | |
---|---|
static class |
CallTraceSorter.TracedCall
Represents a call that has been traced. |
Constructor Summary | |
---|---|
CallTraceSorter()
|
Method Summary | |
---|---|
static void |
main(String[] args)
Main method taking as arguments the name of an input trace file and the name of an output file. |
static SortedSet<CallTraceSorter.TracedCall> |
readTrace(Reader reader)
For each line read from reader, creates an object representing a traced call, puts the objects in a sorted set, and returns that set. |
static void |
writeTrace(Writer writer,
Collection<? extends CallTraceSorter.TracedCall> calls,
int timePrecision)
For each traced call in the collection calls, writes one line on writer by using CallTraceSorter.TracedCall.toString() . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CallTraceSorter()
Method Detail |
---|
public static SortedSet<CallTraceSorter.TracedCall> readTrace(Reader reader) throws IOException
reader
- the reader to obtain the trace from.
IOException
- if an I/O error occurs.public static void writeTrace(Writer writer, Collection<? extends CallTraceSorter.TracedCall> calls, int timePrecision) throws IOException
CallTraceSorter.TracedCall.toString()
.
writer
- the output writer.calls
- the traced calls to write.timePrecision
- the number of decimal digits of precision for time durations.
IOException
- if an I/O error occurs.public static void main(String[] args) throws IOException
args
- the command-line arguments.
IOException
- if an I/O error occurs.
|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |