org.opennms.netmgt.jasper.rrdtool
Class Row

java.lang.Object
  extended by org.opennms.netmgt.jasper.rrdtool.Row
All Implemented Interfaces:
Serializable

public class Row
extends Object
implements Serializable

Class Row.

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

Constructor Summary
Row()
           
 
Method Summary
 void addV(int index, V vV)
           
 void addV(V vV)
           
 Enumeration<V> enumerateV()
          Method enumerateV.
 boolean equals(Object obj)
          Overrides the java.lang.Object.equals method.
 T getT()
          Returns the value of field 't'.
 V[] getV()
          Method getV.Returns the contents of the collection in an Array.
 V getV(int index)
          Method getV.
 List<V> getVCollection()
          Method getVCollection.Returns a reference to '_vList'.
 int getVCount()
          Method getVCount.
 int hashCode()
          Overrides the java.lang.Object.hashCode method.
 boolean isValid()
          Method isValid.
 Iterator<V> iterateV()
          Method iterateV.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllV()
           
 boolean removeV(V vV)
          Method removeV.
 V removeVAt(int index)
          Method removeVAt.
 void setT(T t)
          Sets the value of field 't'.
 void setV(int index, V vV)
           
 void setV(List<V> vVList)
          Sets the value of '_vList' by copying the given Vector.
 void setV(V[] vVArray)
           
 void setVCollection(List<V> vList)
          Deprecated.  
static Row unmarshal(Reader reader)
          Method unmarshal.
 void validate()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Row

public Row()
Method Detail

addV

public void addV(V vV)
          throws IndexOutOfBoundsException
Parameters:
vV -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addV

public void addV(int index,
                 V vV)
          throws IndexOutOfBoundsException
Parameters:
index -
vV -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumerateV

public Enumeration<V> enumerateV()
Method enumerateV.

Returns:
an Enumeration over all possible elements of this collection

equals

public boolean equals(Object obj)
Overrides the java.lang.Object.equals method.

Overrides:
equals in class Object
Parameters:
obj -
Returns:
true if the objects are equal.

getT

public T getT()
Returns the value of field 't'.

Returns:
the value of field 'T'.

getV

public V getV(int index)
       throws IndexOutOfBoundsException
Method getV.

Parameters:
index -
Returns:
the value of the org.opennms.netmgt.jasper.rrdtool.V at the given index
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getV

public V[] getV()
Method getV.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

getVCollection

public List<V> getVCollection()
Method getVCollection.Returns a reference to '_vList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getVCount

public int getVCount()
Method getVCount.

Returns:
the size of this collection

hashCode

public int hashCode()
Overrides the java.lang.Object.hashCode method.

The following steps came from Effective Java Programming Language Guide by Joshua Bloch, Chapter 3

Overrides:
hashCode in class Object
Returns:
a hash code value for the object.

isValid

public boolean isValid()
Method isValid.

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

iterateV

public Iterator<V> iterateV()
Method iterateV.

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

removeAllV

public void removeAllV()

removeV

public boolean removeV(V vV)
Method removeV.

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

removeVAt

public V removeVAt(int index)
Method removeVAt.

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

setT

public void setT(T t)
Sets the value of field 't'.

Parameters:
t - the value of field 't'.

setV

public void setV(int index,
                 V vV)
          throws IndexOutOfBoundsException
Parameters:
index -
vV -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setV

public void setV(V[] vVArray)
Parameters:
vVArray -

setV

public void setV(List<V> vVList)
Sets the value of '_vList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vVList - the Vector to copy.

setVCollection

public void setVCollection(List<V> vList)
Deprecated. 

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

Parameters:
vList - the Vector to set.

unmarshal

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

Parameters:
reader -
Returns:
the unmarshaled org.opennms.netmgt.jasper.rrdtool.Row
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.