Class CalendarTable
- java.lang.Object
-
- org.opennms.reporting.availability.CalendarTable
-
- All Implemented Interfaces:
Serializable
public class CalendarTable extends Object implements Serializable
Class CalendarTable.- Version:
- $Revision$ $Date$
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CalendarTable()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addWeek(int index, Week vWeek)
void
addWeek(Week vWeek)
Enumeration<Week>
enumerateWeek()
Method enumerateWeek.DaysOfWeek
getDaysOfWeek()
Returns the value of field 'daysOfWeek'.String
getMonth()
Returns the value of field 'month'.Week[]
getWeek()
Method getWeek.Returns the contents of the collection in an Array.Week
getWeek(int index)
Method getWeek.List<Week>
getWeekCollection()
Method getWeekCollection.Returns a reference to 'weekList'.int
getWeekCount()
Method getWeekCount.Iterator<Week>
iterateWeek()
Method iterateWeek.void
removeAllWeek()
boolean
removeWeek(Week vWeek)
Method removeWeek.Week
removeWeekAt(int index)
Method removeWeekAt.void
setDaysOfWeek(DaysOfWeek daysOfWeek)
Sets the value of field 'daysOfWeek'.void
setMonth(String month)
Sets the value of field 'month'.void
setWeek(int index, Week vWeek)
void
setWeek(List<Week> vWeekList)
Sets the value of 'weekList' by copying the given Vector.void
setWeek(Week[] vWeekArray)
void
setWeekCollection(List<Week> weekList)
Deprecated.
-
-
-
Method Detail
-
addWeek
public void addWeek(Week vWeek) throws IndexOutOfBoundsException
- Parameters:
vWeek
-- Throws:
IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
addWeek
public void addWeek(int index, Week vWeek) throws IndexOutOfBoundsException
- Parameters:
index
-vWeek
-- Throws:
IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
enumerateWeek
public Enumeration<Week> enumerateWeek()
Method enumerateWeek.- Returns:
- an Enumeration over all possible elements of this collection
-
getDaysOfWeek
public DaysOfWeek getDaysOfWeek()
Returns the value of field 'daysOfWeek'.- Returns:
- the value of field 'DaysOfWeek'.
-
getMonth
public String getMonth()
Returns the value of field 'month'.- Returns:
- the value of field 'Month'.
-
getWeek
public Week getWeek(int index) throws IndexOutOfBoundsException
Method getWeek.- Parameters:
index
-- Returns:
- the value of the Week at the given index
- Throws:
IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
getWeek
public Week[] getWeek()
Method getWeek.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
-
getWeekCollection
public List<Week> getWeekCollection()
Method getWeekCollection.Returns a reference to 'weekList'. No type checking is performed on any modifications to the Vector.- Returns:
- a reference to the Vector backing this class
-
getWeekCount
public int getWeekCount()
Method getWeekCount.- Returns:
- the size of this collection
-
iterateWeek
public Iterator<Week> iterateWeek()
Method iterateWeek.- Returns:
- an Iterator over all possible elements in this collection
-
removeAllWeek
public void removeAllWeek()
-
removeWeek
public boolean removeWeek(Week vWeek)
Method removeWeek.- Parameters:
vWeek
-- Returns:
- true if the object was removed from the collection.
-
removeWeekAt
public Week removeWeekAt(int index)
Method removeWeekAt.- Parameters:
index
-- Returns:
- the element removed from the collection
-
setDaysOfWeek
public void setDaysOfWeek(DaysOfWeek daysOfWeek)
Sets the value of field 'daysOfWeek'.- Parameters:
daysOfWeek
- the value of field 'daysOfWeek'.
-
setMonth
public void setMonth(String month)
Sets the value of field 'month'.- Parameters:
month
- the value of field 'month'.
-
setWeek
public void setWeek(int index, Week vWeek) throws IndexOutOfBoundsException
- Parameters:
index
-vWeek
-- Throws:
IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
setWeek
public void setWeek(Week[] vWeekArray)
- Parameters:
vWeekArray
-
-
setWeek
public void setWeek(List<Week> vWeekList)
Sets the value of 'weekList' by copying the given Vector. All elements will be checked for type safety.- Parameters:
vWeekList
- the Vector to copy.
-
-