org.opennms.netmgt.xml.eventconf
Class Varbind

java.lang.Object
  extended by org.opennms.netmgt.xml.eventconf.Varbind
All Implemented Interfaces:
Serializable

public class Varbind
extends Object
implements Serializable

The varbind element

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

Constructor Summary
Varbind()
           
 
Method Summary
 void addVbvalue(int index, String vVbvalue)
           
 void addVbvalue(String vVbvalue)
           
 void deleteVbnumber()
           
 Enumeration<String> enumerateVbvalue()
          Method enumerateVbvalue.
 String getTextualConvention()
          Returns the value of field 'textualConvention'.
 int getVbnumber()
          Returns the value of field 'vbnumber'.
 String[] getVbvalue()
          Method getVbvalue.Returns the contents of the collection in an Array.
 String getVbvalue(int index)
          Method getVbvalue.
 List<String> getVbvalueCollection()
          Method getVbvalueCollection.Returns a reference to '_vbvalueList'.
 int getVbvalueCount()
          Method getVbvalueCount.
 boolean hasVbnumber()
          Method hasVbnumber.
 boolean isValid()
          Method isValid.
 Iterator<String> iterateVbvalue()
          Method iterateVbvalue.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllVbvalue()
           
 boolean removeVbvalue(String vVbvalue)
          Method removeVbvalue.
 String removeVbvalueAt(int index)
          Method removeVbvalueAt.
 void setTextualConvention(String textualConvention)
          Sets the value of field 'textualConvention'.
 void setVbnumber(int vbnumber)
          Sets the value of field 'vbnumber'.
 void setVbvalue(int index, String vVbvalue)
           
 void setVbvalue(List<String> vVbvalueList)
          Sets the value of '_vbvalueList' by copying the given Vector.
 void setVbvalue(String[] vVbvalueArray)
           
 void setVbvalueCollection(List<String> vbvalueList)
          Deprecated.  
static Varbind 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

Varbind

public Varbind()
Method Detail

addVbvalue

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

addVbvalue

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

deleteVbnumber

public void deleteVbnumber()

enumerateVbvalue

public Enumeration<String> enumerateVbvalue()
Method enumerateVbvalue.

Returns:
an Enumeration over all possible elements of this collection

getTextualConvention

public String getTextualConvention()
Returns the value of field 'textualConvention'.

Returns:
the value of field 'TextualConvention'.

getVbnumber

public int getVbnumber()
Returns the value of field 'vbnumber'. The field 'vbnumber' has the following description: The varbind element number

Returns:
the value of field 'Vbnumber'.

getVbvalue

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

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

getVbvalue

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

getVbvalueCollection

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

Returns:
a reference to the Vector backing this class

getVbvalueCount

public int getVbvalueCount()
Method getVbvalueCount.

Returns:
the size of this collection

hasVbnumber

public boolean hasVbnumber()
Method hasVbnumber.

Returns:
true if at least one Vbnumber has been added

isValid

public boolean isValid()
Method isValid.

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

iterateVbvalue

public Iterator<String> iterateVbvalue()
Method iterateVbvalue.

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

removeAllVbvalue

public void removeAllVbvalue()

removeVbvalue

public boolean removeVbvalue(String vVbvalue)
Method removeVbvalue.

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

removeVbvalueAt

public String removeVbvalueAt(int index)
Method removeVbvalueAt.

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

setTextualConvention

public void setTextualConvention(String textualConvention)
Sets the value of field 'textualConvention'.

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

setVbnumber

public void setVbnumber(int vbnumber)
Sets the value of field 'vbnumber'. The field 'vbnumber' has the following description: The varbind element number

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

setVbvalue

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

setVbvalue

public void setVbvalue(String[] vVbvalueArray)
Parameters:
vVbvalueArray -

setVbvalue

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

Parameters:
vVbvalueList - the Vector to copy.

setVbvalueCollection

public void setVbvalueCollection(List<String> vbvalueList)
Deprecated. 

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

Parameters:
vbvalueList - the Vector to set.

unmarshal

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

Parameters:
reader -
Returns:
the unmarshaled org.opennms.netmgt.xml.eventconf.Varbind
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 ? 2008. All Rights Reserved.