Overview | Package | Class | Tree | Deprecated | Index | Help
| ContactCenters V. 0.9.9.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## umontreal.iro.lecuyer.contactcenters.msk.model
Class TimeInterval

    java.lang.Object
      umontreal.iro.lecuyer.contactcenters.msk.model.TimeInterval

Direct Known Subclasses:
  DialerLimit, ShiftPart

    public class TimeInterval

extends Object

Represents a time interval.

Constructor Summary
`TimeInterval(CallCenter cc, TimeIntervalParams par)` Constructs a time interval from the call center `cc`, and the parameters `par`.
`TimeInterval(double startingTime, double endingTime)` Constructs a new time interval from the given starting and ending times.

Method Summary
`static void` | `checkIntervals(TimeInterval... intervals)` Verifies that the intervals of the given array are non-decreasing and do not overlap.
`static TimeInterval[]` | `create(CallCenter cc, List<TimeIntervalParams> intervalList)` Constructs an array of time intervals from the list of interval parameters.
`double` | `getEndingTime()` Returns the ending time of this interval.
`double` | `getStartingTime()` Returns the starting time of this interval.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TimeInterval

    public TimeInterval(CallCenter cc,
                        TimeIntervalParams par)

  Constructs a time interval from the call center `cc`, and the parameters `par`. This constructor converts times in `par`, expressed as XML durations, to the default time unit used by call center `cc`. It then checks that the starting time of the interval is not greater than its ending time.

  Parameters:
    `cc` - the call center.
    `par` - the parameters.

### TimeInterval

    public TimeInterval(double startingTime,
                        double endingTime)

  Constructs a new time interval from the given starting and ending times.

  Parameters:
    `startingTime` - the starting time.
    `endingTime` - the ending time.

Method Detail

### getStartingTime

    public double getStartingTime()

  Returns the starting time of this interval.

  Returns:
    the starting time.

### getEndingTime

    public double getEndingTime()

  Returns the ending time of this interval.

  Returns:
    the ending time.

### checkIntervals

    public static void checkIntervals(TimeInterval... intervals)

  Verifies that the intervals of the given array are non-decreasing and do not overlap. This method throws an illegal-argument exception if the check fails.

  Parameters:
    `intervals` - the array of intervals to check.

### create

    public static TimeInterval[] create(CallCenter cc,
                                        List<TimeIntervalParams> intervalList)

  Constructs an array of time intervals from the list of interval parameters.

  Parameters:
    `cc` - the call center.
    `intervalList` - the list of interval parameters.
  Returns:
    the array of intervals.

Overview | Package | Class | Tree | Deprecated | Index | Help
| ContactCenters V. 0.9.9.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

To submit a bug or ask questions, send an e-mail to Richard Simard.