Class EventMaskValueList
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<String>
-
- org.opennms.netmgt.eventd.datablock.EventMaskValueList
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<String>
,Collection<String>
,List<String>
,RandomAccess
public class EventMaskValueList extends ArrayList<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
-
-
Constructor Summary
Constructors Constructor Description EventMaskValueList()
Default constructor for this classEventMaskValueList(int initCapacity)
constructor for this classEventMaskValueList(String value)
the constructor for this classEventMaskValueList(Collection<String> c)
constructor for this class
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(int index, String o)
Override to re-evaluate hashcodeboolean
add(String o)
Override to re-evaluate hashcodeboolean
addAll(int index, Collection<? extends String> o)
Override to re-evaluate hashcodeboolean
addAll(Collection<? extends String> o)
Override to re-evaluate hashcodevoid
clear()
Override to re-evaluate hashcodevoid
evaluateHashCode()
Evaluate the hash code for this objectint
hashCode()
Overrides the 'hashCode()' method in the superclass.String
remove(int index)
Override to re-evaluate hashcodeboolean
remove(String o)
Override to re-evaluate hashcodeboolean
removeAll(Collection<?> o)
Override to re-evaluate hashcodeprotected void
removeRange(int from, int to)
Override to re-evaluate hashcodeString
set(int index, 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(Collection<String> c)
constructor for this class- Parameters:
c
- aCollection
object.
-
EventMaskValueList
public EventMaskValueList(int initCapacity)
constructor for this class- Parameters:
initCapacity
- a int.
-
EventMaskValueList
public EventMaskValueList(String value)
the constructor for this class- Parameters:
value
- the string to be added to this list.
-
-
Method Detail
-
add
public boolean add(String o)
Override to re-evaluate hashcode
-
add
public void add(int index, String o)
Override to re-evaluate hashcode
-
addAll
public boolean addAll(Collection<? extends String> o)
Override to re-evaluate hashcode- Specified by:
addAll
in interfaceCollection<String>
- Specified by:
addAll
in interfaceList<String>
- Overrides:
addAll
in classArrayList<String>
- See Also:
ArrayList.addAll(Collection)
-
addAll
public boolean addAll(int index, Collection<? extends String> o)
Override to re-evaluate hashcode
-
clear
public void clear()
Override to re-evaluate hashcode- Specified by:
clear
in interfaceCollection<String>
- Specified by:
clear
in interfaceList<String>
- Overrides:
clear
in classArrayList<String>
- See Also:
ArrayList.clear()
-
remove
public String remove(int index)
Override to re-evaluate hashcode
-
removeRange
protected void removeRange(int from, int to)
Override to re-evaluate hashcode- Overrides:
removeRange
in classArrayList<String>
- See Also:
ArrayList.removeRange(int,int)
-
remove
public boolean remove(String o)
Override to re-evaluate hashcode- Parameters:
o
- aString
object.- Returns:
- a boolean.
- See Also:
ArrayList.remove(Object)
-
removeAll
public boolean removeAll(Collection<?> o)
Override to re-evaluate hashcode- Specified by:
removeAll
in interfaceCollection<String>
- Specified by:
removeAll
in interfaceList<String>
- Overrides:
removeAll
in classArrayList<String>
- See Also:
ArrayList.removeAll(Collection)
-
evaluateHashCode
public void evaluateHashCode()
Evaluate the hash code for this object
-
-