Class Week
- java.lang.Object
-
- org.opennms.reporting.availability.Week
-
- All Implemented Interfaces:
java.io.Serializable
public class Week extends java.lang.Object implements java.io.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)
java.util.Enumeration<Day>
enumerateDay()
Method enumerateDay.Day[]
getDay()
Method getDay.Returns the contents of the collection in an Array.Day
getDay(int index)
Method getDay.java.util.List<Day>
getDayCollection()
Method getDayCollection.Returns a reference to 'dayList'.int
getDayCount()
Method getDayCount.java.util.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(java.util.List<Day> vDayList)
Sets the value of 'dayList' by copying the given Vector.void
setDay(Day[] vDayArray)
void
setDayCollection(java.util.List<Day> dayList)
Deprecated.
-
-
-
Method Detail
-
addDay
public void addDay(Day vDay) throws java.lang.IndexOutOfBoundsException
- Parameters:
vDay
-- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
addDay
public void addDay(int index, Day vDay) throws java.lang.IndexOutOfBoundsException
- Parameters:
index
-vDay
-- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
enumerateDay
public java.util.Enumeration<Day> enumerateDay()
Method enumerateDay.- Returns:
- an Enumeration over all possible elements of this collection
-
getDay
public Day getDay(int index) throws java.lang.IndexOutOfBoundsException
Method getDay.- Parameters:
index
-- Returns:
- the value of the Day at the given index
- Throws:
java.lang.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 java.util.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 java.util.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 java.lang.IndexOutOfBoundsException
- Parameters:
index
-vDay
-- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
setDay
public void setDay(Day[] vDayArray)
- Parameters:
vDayArray
-
-
setDay
public void setDay(java.util.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.
-
setDayCollection
public void setDayCollection(java.util.List<Day> dayList)
Deprecated.Sets the value of 'dayList' by setting it to the given Vector. No type checking is performed.- Parameters:
dayList
- the Vector to set.
-
-