Class Mask

  • All Implemented Interfaces:
    java.io.Serializable

    public class Mask
    extends java.lang.Object
    implements java.io.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 Detail

      • Mask

        public Mask()
    • Method Detail

      • copyFrom

        public static Mask copyFrom​(IMask source)
      • addMaskelement

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

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

        public java.util.Enumeration<Maskelement> enumerateMaskelement()
        Method enumerateMaskelement.
        Returns:
        an Enumeration over all possible elements of this collection
      • getMaskelement

        public Maskelement getMaskelement​(int index)
                                   throws java.lang.IndexOutOfBoundsException
        Method getMaskelement.
        Parameters:
        index -
        Returns:
        the value of the org.opennms.netmgt.xml.event.Maskelement at the given index
        Throws:
        java.lang.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 java.util.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 java.util.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 java.lang.IndexOutOfBoundsException
        Parameters:
        index -
        vMaskelement -
        Throws:
        java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection
      • setMaskelement

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

        public void setMaskelement​(java.util.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​(java.util.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 java.lang.String toString()
        Overrides:
        toString in class java.lang.Object