Class CalendarTable
- java.lang.Object
-
- org.opennms.reporting.availability.CalendarTable
-
- All Implemented Interfaces:
java.io.Serializable
public class CalendarTable extends java.lang.Object implements java.io.SerializableClass 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)java.util.Enumeration<Week>enumerateWeek()Method enumerateWeek.DaysOfWeekgetDaysOfWeek()Returns the value of field 'daysOfWeek'.java.lang.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.java.util.List<Week>getWeekCollection()Method getWeekCollection.Returns a reference to 'weekList'.intgetWeekCount()Method getWeekCount.java.util.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(java.lang.String month)Sets the value of field 'month'.voidsetWeek(int index, Week vWeek)voidsetWeek(java.util.List<Week> vWeekList)Sets the value of 'weekList' by copying the given Vector.voidsetWeek(Week[] vWeekArray)voidsetWeekCollection(java.util.List<Week> weekList)Deprecated.
-
-
-
Method Detail
-
addWeek
public void addWeek(Week vWeek) throws java.lang.IndexOutOfBoundsException
- Parameters:
vWeek-- Throws:
java.lang.IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
addWeek
public void addWeek(int index, Week vWeek) throws java.lang.IndexOutOfBoundsException- Parameters:
index-vWeek-- Throws:
java.lang.IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
enumerateWeek
public java.util.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 java.lang.String getMonth()
Returns the value of field 'month'.- Returns:
- the value of field 'Month'.
-
getWeek
public Week getWeek(int index) throws java.lang.IndexOutOfBoundsException
Method getWeek.- Parameters:
index-- Returns:
- the value of the Week at the given index
- Throws:
java.lang.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 java.util.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 java.util.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(java.lang.String month)
Sets the value of field 'month'.- Parameters:
month- the value of field 'month'.
-
setWeek
public void setWeek(int index, Week vWeek) throws java.lang.IndexOutOfBoundsException- Parameters:
index-vWeek-- Throws:
java.lang.IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
setWeek
public void setWeek(Week[] vWeekArray)
- Parameters:
vWeekArray-
-
setWeek
public void setWeek(java.util.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.
-
setWeekCollection
public void setWeekCollection(java.util.List<Week> weekList)
Deprecated.Sets the value of 'weekList' by setting it to the given Vector. No type checking is performed.- Parameters:
weekList- the Vector to set.
-
-