org.opennms.report.availability
Class Rows

java.lang.Object
  extended by org.opennms.report.availability.Rows
All Implemented Interfaces:
Serializable

public class Rows
extends Object
implements Serializable

Class Rows.

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

Constructor Summary
Rows()
           
 
Method Summary
 void addRow(int index, Row vRow)
           
 void addRow(Row vRow)
           
 Enumeration<Row> enumerateRow()
          Method enumerateRow.
 Row[] getRow()
          Method getRow.Returns the contents of the collection in an Array.
 Row getRow(int index)
          Method getRow.
 List<Row> getRowCollection()
          Method getRowCollection.Returns a reference to '_rowList'.
 int getRowCount()
          Method getRowCount.
 boolean isValid()
          Method isValid.
 Iterator<Row> iterateRow()
          Method iterateRow.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllRow()
           
 boolean removeRow(Row vRow)
          Method removeRow.
 Row removeRowAt(int index)
          Method removeRowAt.
 void setRow(int index, Row vRow)
           
 void setRow(List<Row> vRowList)
          Sets the value of '_rowList' by copying the given Vector.
 void setRow(Row[] vRowArray)
           
 void setRowCollection(List<Row> rowList)
          Deprecated.  
static Rows 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

Rows

public Rows()
Method Detail

addRow

public void addRow(Row vRow)
            throws IndexOutOfBoundsException
Parameters:
vRow -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addRow

public void addRow(int index,
                   Row vRow)
            throws IndexOutOfBoundsException
Parameters:
index -
vRow -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumerateRow

public Enumeration<Row> enumerateRow()
Method enumerateRow.

Returns:
an Enumeration over all possible elements of this collection

getRow

public Row getRow(int index)
           throws IndexOutOfBoundsException
Method getRow.

Parameters:
index -
Returns:
the value of the org.opennms.report.availability.Row at the given index
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getRow

public Row[] getRow()
Method getRow.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

getRowCollection

public List<Row> getRowCollection()
Method getRowCollection.Returns a reference to '_rowList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getRowCount

public int getRowCount()
Method getRowCount.

Returns:
the size of this collection

isValid

public boolean isValid()
Method isValid.

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

iterateRow

public Iterator<Row> iterateRow()
Method iterateRow.

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

removeAllRow

public void removeAllRow()

removeRow

public boolean removeRow(Row vRow)
Method removeRow.

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

removeRowAt

public Row removeRowAt(int index)
Method removeRowAt.

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

setRow

public void setRow(int index,
                   Row vRow)
            throws IndexOutOfBoundsException
Parameters:
index -
vRow -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setRow

public void setRow(Row[] vRowArray)
Parameters:
vRowArray -

setRow

public void setRow(List<Row> vRowList)
Sets the value of '_rowList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vRowList - the Vector to copy.

setRowCollection

public void setRowCollection(List<Row> rowList)
Deprecated. 

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

Parameters:
rowList - the Vector to set.

unmarshal

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

Parameters:
reader -
Returns:
the unmarshaled org.opennms.report.availability.Rows
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.