org.opennms.netmgt.config.map.adapter
Class Cmaps

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

public class Cmaps
extends Object
implements Serializable

Configuration of maps functionality

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

Constructor Summary
Cmaps()
           
 
Method Summary
 void addCmap(Cmap vCmap)
           
 void addCmap(int index, Cmap vCmap)
           
 Enumeration<Cmap> enumerateCmap()
          Method enumerateCmap.
 boolean equals(Object obj)
          Overrides the java.lang.Object.equals method.
 Cmap[] getCmap()
          Method getCmap.Returns the contents of the collection in an Array.
 Cmap getCmap(int index)
          Method getCmap.
 List<Cmap> getCmapCollection()
          Method getCmapCollection.Returns a reference to '_cmapList'.
 int getCmapCount()
          Method getCmapCount.
 int hashCode()
          Overrides the java.lang.Object.hashCode method.
 boolean isValid()
          Method isValid.
 Iterator<Cmap> iterateCmap()
          Method iterateCmap.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllCmap()
           
 boolean removeCmap(Cmap vCmap)
          Method removeCmap.
 Cmap removeCmapAt(int index)
          Method removeCmapAt.
 void setCmap(Cmap[] vCmapArray)
           
 void setCmap(int index, Cmap vCmap)
           
 void setCmap(List<Cmap> vCmapList)
          Sets the value of '_cmapList' by copying the given Vector.
 void setCmapCollection(List<Cmap> cmapList)
          Deprecated.  
static Cmaps 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

Cmaps

public Cmaps()
Method Detail

addCmap

public void addCmap(Cmap vCmap)
             throws IndexOutOfBoundsException
Parameters:
vCmap -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addCmap

public void addCmap(int index,
                    Cmap vCmap)
             throws IndexOutOfBoundsException
Parameters:
index -
vCmap -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumerateCmap

public Enumeration<Cmap> enumerateCmap()
Method enumerateCmap.

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.

getCmap

public Cmap getCmap(int index)
             throws IndexOutOfBoundsException
Method getCmap.

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

getCmap

public Cmap[] getCmap()
Method getCmap.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

getCmapCollection

public List<Cmap> getCmapCollection()
Method getCmapCollection.Returns a reference to '_cmapList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getCmapCount

public int getCmapCount()
Method getCmapCount.

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

iterateCmap

public Iterator<Cmap> iterateCmap()
Method iterateCmap.

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

removeAllCmap

public void removeAllCmap()

removeCmap

public boolean removeCmap(Cmap vCmap)
Method removeCmap.

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

removeCmapAt

public Cmap removeCmapAt(int index)
Method removeCmapAt.

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

setCmap

public void setCmap(int index,
                    Cmap vCmap)
             throws IndexOutOfBoundsException
Parameters:
index -
vCmap -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setCmap

public void setCmap(Cmap[] vCmapArray)
Parameters:
vCmapArray -

setCmap

public void setCmap(List<Cmap> vCmapList)
Sets the value of '_cmapList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vCmapList - the Vector to copy.

setCmapCollection

public void setCmapCollection(List<Cmap> cmapList)
Deprecated. 

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

Parameters:
cmapList - the Vector to set.

unmarshal

public static Cmaps 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.map.adapter.Cmaps
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.