cdx.scorebot.app.tester
Class ScheduledDowntimes

java.lang.Object
  extended by cdx.scorebot.app.tester.ScheduledDowntimes
All Implemented Interfaces:
java.io.Serializable

public class ScheduledDowntimes
extends java.lang.Object
implements java.io.Serializable

Contains information about scheduled downtimes (times when tests should not be executed)

Author:
David Underhill
See Also:
Serialized Form

Constructor Summary
ScheduledDowntimes()
          default constructor
 
Method Summary
 void addScheduledDowntime(TimestampRange tr)
          Adds the range of time to stop conducting tests if it is in the future.
 TimestampRange getScheduledDowntime(int index)
          Gets the downtime at the specified index from the scheduled downtimes list.
 java.util.Vector<TimestampRange> getScheduledDowntimes()
          Gets all scheduled downtimes in order from earliest starting time to latest.
 java.util.Vector<TimestampRange> getScheduledDowntimesCopy()
          Gets a COPY of all scheduled downtimes in order from earliest starting time to latest.
 void removeScheduledDowntime(int index)
          Removes the downtime at the specified index from the scheduled downtimes list.
 void removeScheduledDowntime(TimestampRange downtime)
          Removes the specified downtime from the scheduled downtimes list.
 int size()
          gets the number of scheduled downtimes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScheduledDowntimes

public ScheduledDowntimes()
default constructor

Method Detail

addScheduledDowntime

public void addScheduledDowntime(TimestampRange tr)
Adds the range of time to stop conducting tests if it is in the future.

Parameters:
tr - time period during which tests should not be run

getScheduledDowntime

public TimestampRange getScheduledDowntime(int index)
                                    throws java.lang.ArrayIndexOutOfBoundsException
Gets the downtime at the specified index from the scheduled downtimes list.

Parameters:
index - returns the downtime at the specified index
Throws:
java.lang.ArrayIndexOutOfBoundsException - if the index was invalid.

removeScheduledDowntime

public void removeScheduledDowntime(int index)
                             throws java.lang.ArrayIndexOutOfBoundsException
Removes the downtime at the specified index from the scheduled downtimes list.

Parameters:
index - remove the downtime at the specified index
Throws:
java.lang.ArrayIndexOutOfBoundsException - if the index was invalid.

removeScheduledDowntime

public void removeScheduledDowntime(TimestampRange downtime)
Removes the specified downtime from the scheduled downtimes list.

Parameters:
downtime - remove this downtime

getScheduledDowntimes

public java.util.Vector<TimestampRange> getScheduledDowntimes()
Gets all scheduled downtimes in order from earliest starting time to latest.

Returns:
downtimes during which tests will not be carried out

getScheduledDowntimesCopy

public java.util.Vector<TimestampRange> getScheduledDowntimesCopy()
Gets a COPY of all scheduled downtimes in order from earliest starting time to latest.

Returns:
downtimes during which tests will not be carried out

size

public int size()
gets the number of scheduled downtimes