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 voidaddWeek(int index, Week vWeek)voidaddWeek(Week vWeek)Enumeration<Week>enumerateWeek()Method enumerateWeek.DaysOfWeekgetDaysOfWeek()Returns the value of field 'daysOfWeek'.StringgetMonth()Returns the value of field 'month'.Week[]getWeek()Method getWeek.Returns the contents of the collection in an Array.WeekgetWeek(int index)Method getWeek.List<Week>getWeekCollection()Method getWeekCollection.Returns a reference to 'weekList'.intgetWeekCount()Method getWeekCount.Iterator<Week>iterateWeek()Method iterateWeek.voidremoveAllWeek()booleanremoveWeek(Week vWeek)Method removeWeek.WeekremoveWeekAt(int index)Method removeWeekAt.voidsetDaysOfWeek(DaysOfWeek daysOfWeek)Sets the value of field 'daysOfWeek'.voidsetMonth(String month)Sets the value of field 'month'.voidsetWeek(int index, Week vWeek)voidsetWeek(List<Week> vWeekList)Sets the value of 'weekList' by copying the given Vector.voidsetWeek(Week[] vWeekArray)voidsetWeekCollection(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.
-
-