org.opennms.netmgt.config.snmpAsset.adapter
Class Package

java.lang.Object
  extended by org.opennms.netmgt.config.snmpAsset.adapter.Package
All Implemented Interfaces:
Serializable

public class Package
extends Object
implements Serializable

Class Package.

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

Constructor Summary
Package()
           
 
Method Summary
 void addAssetField(AssetField vAssetField)
           
 void addAssetField(int index, AssetField vAssetField)
           
 Enumeration<AssetField> enumerateAssetField()
          Method enumerateAssetField.
 boolean equals(Object obj)
          Overrides the java.lang.Object.equals method.
 AssetField[] getAssetField()
          Method getAssetField.Returns the contents of the collection in an Array.
 AssetField getAssetField(int index)
          Method getAssetField.
 List<AssetField> getAssetFieldCollection()
          Method getAssetFieldCollection.Returns a reference to '_assetFieldList'.
 int getAssetFieldCount()
          Method getAssetFieldCount.
 String getName()
          Returns the value of field 'name'.
 PackageChoice getPackageChoice()
          Returns the value of field 'packageChoice'.
 int hashCode()
          Overrides the java.lang.Object.hashCode method.
 boolean isValid()
          Method isValid.
 Iterator<AssetField> iterateAssetField()
          Method iterateAssetField.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllAssetField()
           
 boolean removeAssetField(AssetField vAssetField)
          Method removeAssetField.
 AssetField removeAssetFieldAt(int index)
          Method removeAssetFieldAt.
 void setAssetField(AssetField[] vAssetFieldArray)
           
 void setAssetField(int index, AssetField vAssetField)
           
 void setAssetField(List<AssetField> vAssetFieldList)
          Sets the value of '_assetFieldList' by copying the given Vector.
 void setAssetFieldCollection(List<AssetField> assetFieldList)
          Deprecated.  
 void setName(String name)
          Sets the value of field 'name'.
 void setPackageChoice(PackageChoice packageChoice)
          Sets the value of field 'packageChoice'.
static Package 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

Package

public Package()
Method Detail

addAssetField

public void addAssetField(AssetField vAssetField)
                   throws IndexOutOfBoundsException
Parameters:
vAssetField -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addAssetField

public void addAssetField(int index,
                          AssetField vAssetField)
                   throws IndexOutOfBoundsException
Parameters:
index -
vAssetField -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumerateAssetField

public Enumeration<AssetField> enumerateAssetField()
Method enumerateAssetField.

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.

getAssetField

public AssetField getAssetField(int index)
                         throws IndexOutOfBoundsException
Method getAssetField.

Parameters:
index -
Returns:
the value of the org.opennms.netmgt.config.snmpAsset.adapter.AssetField at the given index
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getAssetField

public AssetField[] getAssetField()
Method getAssetField.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

getAssetFieldCollection

public List<AssetField> getAssetFieldCollection()
Method getAssetFieldCollection.Returns a reference to '_assetFieldList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getAssetFieldCount

public int getAssetFieldCount()
Method getAssetFieldCount.

Returns:
the size of this collection

getName

public String getName()
Returns the value of field 'name'.

Returns:
the value of field 'Name'.

getPackageChoice

public PackageChoice getPackageChoice()
Returns the value of field 'packageChoice'.

Returns:
the value of field 'PackageChoice'.

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

iterateAssetField

public Iterator<AssetField> iterateAssetField()
Method iterateAssetField.

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

removeAllAssetField

public void removeAllAssetField()

removeAssetField

public boolean removeAssetField(AssetField vAssetField)
Method removeAssetField.

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

removeAssetFieldAt

public AssetField removeAssetFieldAt(int index)
Method removeAssetFieldAt.

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

setAssetField

public void setAssetField(int index,
                          AssetField vAssetField)
                   throws IndexOutOfBoundsException
Parameters:
index -
vAssetField -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setAssetField

public void setAssetField(AssetField[] vAssetFieldArray)
Parameters:
vAssetFieldArray -

setAssetField

public void setAssetField(List<AssetField> vAssetFieldList)
Sets the value of '_assetFieldList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vAssetFieldList - the Vector to copy.

setAssetFieldCollection

public void setAssetFieldCollection(List<AssetField> assetFieldList)
Deprecated. 

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

Parameters:
assetFieldList - the Vector to set.

setName

public void setName(String name)
Sets the value of field 'name'.

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

setPackageChoice

public void setPackageChoice(PackageChoice packageChoice)
Sets the value of field 'packageChoice'.

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

unmarshal

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

Parameters:
reader -
Returns:
the unmarshaled org.opennms.netmgt.config.snmpAsset.adapter.Package
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.