org.opennms.reporting.availability
Class DaysOfWeek

java.lang.Object
  extended by org.opennms.reporting.availability.DaysOfWeek
All Implemented Interfaces:
Serializable

public class DaysOfWeek
extends Object
implements Serializable

Class DaysOfWeek.

Version:
$Revision$ $Date$
See Also:
Serialized Form

Constructor Summary
DaysOfWeek()
           
 
Method Summary
 void addDayName(int index, String vDayName)
           
 void addDayName(String vDayName)
           
 Enumeration<String> enumerateDayName()
          Method enumerateDayName.
 String[] getDayName()
          Method getDayName.Returns the contents of the collection in an Array.
 String getDayName(int index)
          Method getDayName.
 List<String> getDayNameCollection()
          Method getDayNameCollection.Returns a reference to '_dayNameList'.
 int getDayNameCount()
          Method getDayNameCount.
 boolean isValid()
          Method isValid.
 Iterator<String> iterateDayName()
          Method iterateDayName.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllDayName()
           
 boolean removeDayName(String vDayName)
          Method removeDayName.
 String removeDayNameAt(int index)
          Method removeDayNameAt.
 void setDayName(int index, String vDayName)
           
 void setDayName(List<String> vDayNameList)
          Sets the value of '_dayNameList' by copying the given Vector.
 void setDayName(String[] vDayNameArray)
           
 void setDayNameCollection(List<String> dayNameList)
          Deprecated.  
static DaysOfWeek unmarshal(Reader reader)
          Method unmarshal.
 void validate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DaysOfWeek

public DaysOfWeek()
Method Detail

addDayName

public void addDayName(String vDayName)
                throws IndexOutOfBoundsException
Parameters:
vDayName -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addDayName

public void addDayName(int index,
                       String vDayName)
                throws IndexOutOfBoundsException
Parameters:
index -
vDayName -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumerateDayName

public Enumeration<String> enumerateDayName()
Method enumerateDayName.

Returns:
an Enumeration over all possible elements of this collection

getDayName

public String getDayName(int index)
                  throws IndexOutOfBoundsException
Method getDayName.

Parameters:
index -
Returns:
the value of the java.lang.String at the given index
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getDayName

public String[] getDayName()
Method getDayName.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

getDayNameCollection

public List<String> getDayNameCollection()
Method getDayNameCollection.Returns a reference to '_dayNameList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getDayNameCount

public int getDayNameCount()
Method getDayNameCount.

Returns:
the size of this collection

isValid

public boolean isValid()
Method isValid.

Returns:
true if this object is valid according to the schema

iterateDayName

public Iterator<String> iterateDayName()
Method iterateDayName.

Returns:
an Iterator over all possible elements in this collection

marshal

public void marshal(Writer out)
             throws org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Parameters:
out -
Throws:
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema

marshal

public void marshal(ContentHandler handler)
             throws IOException,
                    org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Parameters:
handler -
Throws:
IOException - if an IOException occurs during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling

removeAllDayName

public void removeAllDayName()

removeDayName

public boolean removeDayName(String vDayName)
Method removeDayName.

Parameters:
vDayName -
Returns:
true if the object was removed from the collection.

removeDayNameAt

public String removeDayNameAt(int index)
Method removeDayNameAt.

Parameters:
index -
Returns:
the element removed from the collection

setDayName

public void setDayName(int index,
                       String vDayName)
                throws IndexOutOfBoundsException
Parameters:
index -
vDayName -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setDayName

public void setDayName(String[] vDayNameArray)
Parameters:
vDayNameArray -

setDayName

public void setDayName(List<String> vDayNameList)
Sets the value of '_dayNameList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vDayNameList - the Vector to copy.

setDayNameCollection

public void setDayNameCollection(List<String> dayNameList)
Deprecated. 

Sets the value of '_dayNameList' by setting it to the given Vector. No type checking is performed.

Parameters:
dayNameList - the Vector to set.

unmarshal

public static DaysOfWeek unmarshal(Reader reader)
                            throws org.exolab.castor.xml.MarshalException,
                                   org.exolab.castor.xml.ValidationException
Method unmarshal.

Parameters:
reader -
Returns:
the unmarshaled org.opennms.reporting.availability.DaysOfWeek
Throws:
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema

validate

public void validate()
              throws org.exolab.castor.xml.ValidationException
Throws:
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema


Copyright © 2011. All Rights Reserved.