org.opennms.netmgt.xml.event
Class Mask

java.lang.Object
  extended by org.opennms.netmgt.xml.event.Mask
All Implemented Interfaces:
Serializable

public class Mask
extends Object
implements Serializable

The Mask for event configuration: The mask contains one or more 'maskelements' which uniquely identify an event. This can only include elements from the following subset: uei, source, host, snmphost, nodeid, interface, service, id(SNMP EID), specific, generic, community

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

Constructor Summary
Mask()
           
 
Method Summary
 void addMaskelement(int index, Maskelement vMaskelement)
           
 void addMaskelement(Maskelement vMaskelement)
           
 Enumeration<Maskelement> enumerateMaskelement()
          Method enumerateMaskelement.
 Maskelement[] getMaskelement()
          Method getMaskelement.Returns the contents of the collection in an Array.
 Maskelement getMaskelement(int index)
          Method getMaskelement.
 List<Maskelement> getMaskelementCollection()
          Method getMaskelementCollection.Returns a reference to '_maskelementList'.
 int getMaskelementCount()
          Method getMaskelementCount.
 Iterator<Maskelement> iterateMaskelement()
          Method iterateMaskelement.
 void removeAllMaskelement()
           
 boolean removeMaskelement(Maskelement vMaskelement)
          Method removeMaskelement.
 Maskelement removeMaskelementAt(int index)
          Method removeMaskelementAt.
 void setMaskelement(int index, Maskelement vMaskelement)
           
 void setMaskelement(List<Maskelement> vMaskelementList)
          Sets the value of '_maskelementList' by copying the given Vector.
 void setMaskelement(Maskelement[] vMaskelementArray)
           
 void setMaskelementCollection(List<Maskelement> maskelementList)
          Deprecated.  
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Mask

public Mask()
Method Detail

addMaskelement

public void addMaskelement(Maskelement vMaskelement)
                    throws IndexOutOfBoundsException
Parameters:
vMaskelement -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addMaskelement

public void addMaskelement(int index,
                           Maskelement vMaskelement)
                    throws IndexOutOfBoundsException
Parameters:
index -
vMaskelement -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumerateMaskelement

public Enumeration<Maskelement> enumerateMaskelement()
Method enumerateMaskelement.

Returns:
an Enumeration over all possible elements of this collection

getMaskelement

public Maskelement getMaskelement(int index)
                           throws IndexOutOfBoundsException
Method getMaskelement.

Parameters:
index -
Returns:
the value of the org.opennms.netmgt.xml.event.Maskelement at the given index
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getMaskelement

public Maskelement[] getMaskelement()
Method getMaskelement.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

getMaskelementCollection

public List<Maskelement> getMaskelementCollection()
Method getMaskelementCollection.Returns a reference to '_maskelementList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getMaskelementCount

public int getMaskelementCount()
Method getMaskelementCount.

Returns:
the size of this collection

iterateMaskelement

public Iterator<Maskelement> iterateMaskelement()
Method iterateMaskelement.

Returns:
an Iterator over all possible elements in this collection

removeAllMaskelement

public void removeAllMaskelement()

removeMaskelement

public boolean removeMaskelement(Maskelement vMaskelement)
Method removeMaskelement.

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

removeMaskelementAt

public Maskelement removeMaskelementAt(int index)
Method removeMaskelementAt.

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

setMaskelement

public void setMaskelement(int index,
                           Maskelement vMaskelement)
                    throws IndexOutOfBoundsException
Parameters:
index -
vMaskelement -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setMaskelement

public void setMaskelement(Maskelement[] vMaskelementArray)
Parameters:
vMaskelementArray -

setMaskelement

public void setMaskelement(List<Maskelement> vMaskelementList)
Sets the value of '_maskelementList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vMaskelementList - the Vector to copy.

setMaskelementCollection

public void setMaskelementCollection(List<Maskelement> maskelementList)
Deprecated. 

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

Parameters:
maskelementList - the Vector to set.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.