Class EventMaskValueList

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<java.lang.String>, java.util.Collection<java.lang.String>, java.util.List<java.lang.String>, java.util.RandomAccess

    public class EventMaskValueList
    extends java.util.ArrayList<java.lang.String>
    The maskelement values in a 'EventKey' are stored in this ArrayList subclass This list is pretty much constant once it constructed - so the hashcode is evaluated once at construction and reused(if new values are added or values changed, hashcode is re-evaluated)
    Version:
    $Id: $
    Author:
    Sowmya Nataraj , OpenNMS.org , Sowmya Nataraj , OpenNMS.org
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class java.util.AbstractList

        modCount
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(int index, java.lang.String o)
      Override to re-evaluate hashcode
      boolean add​(java.lang.String o)
      Override to re-evaluate hashcode
      boolean addAll​(int index, java.util.Collection<? extends java.lang.String> o)
      Override to re-evaluate hashcode
      boolean addAll​(java.util.Collection<? extends java.lang.String> o)
      Override to re-evaluate hashcode
      void clear()
      Override to re-evaluate hashcode
      void evaluateHashCode()
      Evaluate the hash code for this object
      int hashCode()
      Overrides the 'hashCode()' method in the superclass.
      java.lang.String remove​(int index)
      Override to re-evaluate hashcode
      boolean remove​(java.lang.String o)
      Override to re-evaluate hashcode
      boolean removeAll​(java.util.Collection<?> o)
      Override to re-evaluate hashcode
      protected void removeRange​(int from, int to)
      Override to re-evaluate hashcode
      java.lang.String set​(int index, java.lang.String o)
      Override to re-evaluate hashcode
      • Methods inherited from class java.util.ArrayList

        clone, contains, ensureCapacity, equals, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, removeIf, replaceAll, retainAll, size, sort, spliterator, subList, toArray, toArray, trimToSize
      • Methods inherited from class java.util.AbstractCollection

        containsAll, toString
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, stream, toArray
      • Methods inherited from interface java.util.List

        containsAll
    • Constructor Detail

      • EventMaskValueList

        public EventMaskValueList()
        Default constructor for this class
      • EventMaskValueList

        public EventMaskValueList​(java.util.Collection<java.lang.String> c)
        constructor for this class
        Parameters:
        c - a Collection object.
      • EventMaskValueList

        public EventMaskValueList​(int initCapacity)
        constructor for this class
        Parameters:
        initCapacity - a int.
      • EventMaskValueList

        public EventMaskValueList​(java.lang.String value)
        the constructor for this class
        Parameters:
        value - the string to be added to this list.
    • Method Detail

      • add

        public boolean add​(java.lang.String o)
        Override to re-evaluate hashcode
        Specified by:
        add in interface java.util.Collection<java.lang.String>
        Specified by:
        add in interface java.util.List<java.lang.String>
        Overrides:
        add in class java.util.ArrayList<java.lang.String>
        Parameters:
        o - a String object.
        Returns:
        a boolean.
        See Also:
        ArrayList.add(Object)
      • add

        public void add​(int index,
                        java.lang.String o)
        Override to re-evaluate hashcode
        Specified by:
        add in interface java.util.List<java.lang.String>
        Overrides:
        add in class java.util.ArrayList<java.lang.String>
        Parameters:
        index - a int.
        o - a String object.
        See Also:
        ArrayList.add(int, Object)
      • addAll

        public boolean addAll​(java.util.Collection<? extends java.lang.String> o)
        Override to re-evaluate hashcode
        Specified by:
        addAll in interface java.util.Collection<java.lang.String>
        Specified by:
        addAll in interface java.util.List<java.lang.String>
        Overrides:
        addAll in class java.util.ArrayList<java.lang.String>
        See Also:
        ArrayList.addAll(Collection)
      • addAll

        public boolean addAll​(int index,
                              java.util.Collection<? extends java.lang.String> o)
        Override to re-evaluate hashcode
        Specified by:
        addAll in interface java.util.List<java.lang.String>
        Overrides:
        addAll in class java.util.ArrayList<java.lang.String>
        See Also:
        ArrayList.addAll(int, Collection)
      • clear

        public void clear()
        Override to re-evaluate hashcode
        Specified by:
        clear in interface java.util.Collection<java.lang.String>
        Specified by:
        clear in interface java.util.List<java.lang.String>
        Overrides:
        clear in class java.util.ArrayList<java.lang.String>
        See Also:
        ArrayList.clear()
      • remove

        public java.lang.String remove​(int index)
        Override to re-evaluate hashcode
        Specified by:
        remove in interface java.util.List<java.lang.String>
        Overrides:
        remove in class java.util.ArrayList<java.lang.String>
        See Also:
        ArrayList.remove(int)
      • removeRange

        protected void removeRange​(int from,
                                   int to)
        Override to re-evaluate hashcode
        Overrides:
        removeRange in class java.util.ArrayList<java.lang.String>
        See Also:
        ArrayList.removeRange(int,int)
      • remove

        public boolean remove​(java.lang.String o)
        Override to re-evaluate hashcode
        Parameters:
        o - a String object.
        Returns:
        a boolean.
        See Also:
        ArrayList.remove(Object)
      • removeAll

        public boolean removeAll​(java.util.Collection<?> o)
        Override to re-evaluate hashcode
        Specified by:
        removeAll in interface java.util.Collection<java.lang.String>
        Specified by:
        removeAll in interface java.util.List<java.lang.String>
        Overrides:
        removeAll in class java.util.ArrayList<java.lang.String>
        See Also:
        ArrayList.removeAll(Collection)
      • set

        public java.lang.String set​(int index,
                                    java.lang.String o)
        Override to re-evaluate hashcode
        Specified by:
        set in interface java.util.List<java.lang.String>
        Overrides:
        set in class java.util.ArrayList<java.lang.String>
        Parameters:
        index - a int.
        o - a String object.
        Returns:
        a String object.
        See Also:
        ArrayList.set(int,Object)
      • evaluateHashCode

        public void evaluateHashCode()
        Evaluate the hash code for this object
      • hashCode

        public int hashCode()
        Overrides the 'hashCode()' method in the superclass.
        Specified by:
        hashCode in interface java.util.Collection<java.lang.String>
        Specified by:
        hashCode in interface java.util.List<java.lang.String>
        Overrides:
        hashCode in class java.util.ArrayList<java.lang.String>
        Returns:
        a hash code for this object