Class Week
- java.lang.Object
-
- org.opennms.reporting.availability.Week
-
- All Implemented Interfaces:
Serializable
public class Week extends Object implements Serializable
Class Week.- Version:
- $Revision$ $Date$
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Week()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addDay(int index, Day vDay)
void
addDay(Day vDay)
Enumeration<Day>
enumerateDay()
Method enumerateDay.Day[]
getDay()
Method getDay.Returns the contents of the collection in an Array.Day
getDay(int index)
Method getDay.List<Day>
getDayCollection()
Method getDayCollection.Returns a reference to 'dayList'.int
getDayCount()
Method getDayCount.Iterator<Day>
iterateDay()
Method iterateDay.void
removeAllDay()
boolean
removeDay(Day vDay)
Method removeDay.Day
removeDayAt(int index)
Method removeDayAt.void
setDay(int index, Day vDay)
void
setDay(List<Day> vDayList)
Sets the value of 'dayList' by copying the given Vector.void
setDay(Day[] vDayArray)
void
setDayCollection(List<Day> dayList)
Deprecated.
-
-
-
Method Detail
-
addDay
public void addDay(Day vDay) throws IndexOutOfBoundsException
- Parameters:
vDay
-- Throws:
IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
addDay
public void addDay(int index, Day vDay) throws IndexOutOfBoundsException
- Parameters:
index
-vDay
-- Throws:
IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
enumerateDay
public Enumeration<Day> enumerateDay()
Method enumerateDay.- Returns:
- an Enumeration over all possible elements of this collection
-
getDay
public Day getDay(int index) throws IndexOutOfBoundsException
Method getDay.- Parameters:
index
-- Returns:
- the value of the Day at the given index
- Throws:
IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
getDay
public Day[] getDay()
Method getDay.Returns the contents of the collection in an Array.Note: Just in case the collection contents are changing in another thread, we pass a 0-length Array of the correct type into the API call. This way we know that the Array returned is of exactly the correct length.
- Returns:
- this collection as an Array
-
getDayCollection
public List<Day> getDayCollection()
Method getDayCollection.Returns a reference to 'dayList'. No type checking is performed on any modifications to the Vector.- Returns:
- a reference to the Vector backing this class
-
getDayCount
public int getDayCount()
Method getDayCount.- Returns:
- the size of this collection
-
iterateDay
public Iterator<Day> iterateDay()
Method iterateDay.- Returns:
- an Iterator over all possible elements in this collection
-
removeAllDay
public void removeAllDay()
-
removeDay
public boolean removeDay(Day vDay)
Method removeDay.- Parameters:
vDay
-- Returns:
- true if the object was removed from the collection.
-
removeDayAt
public Day removeDayAt(int index)
Method removeDayAt.- Parameters:
index
-- Returns:
- the element removed from the collection
-
setDay
public void setDay(int index, Day vDay) throws IndexOutOfBoundsException
- Parameters:
index
-vDay
-- Throws:
IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
setDay
public void setDay(Day[] vDayArray)
- Parameters:
vDayArray
-
-
setDay
public void setDay(List<Day> vDayList)
Sets the value of 'dayList' by copying the given Vector. All elements will be checked for type safety.- Parameters:
vDayList
- the Vector to copy.
-
-