edu.umd.cs.findbugs.gui2
Class HashList<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<E>
edu.umd.cs.findbugs.gui2.HashList<E>
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<E>, java.util.Collection<E>, java.util.List<E>, java.util.RandomAccess
public class HashList<E>
- extends java.util.ArrayList<E>
A list with ArrayList's fast add and set operations,
and HashMap's fast contains and indexOf() operations. The
tradeoff is an O(n) remove.
- See Also:
- Serialized Form
| Fields inherited from class java.util.AbstractList |
modCount |
|
Method Summary |
boolean |
add(E o)
|
void |
add(int index,
E element)
|
boolean |
addAll(java.util.Collection<? extends E> c)
|
boolean |
addAll(int index,
java.util.Collection<? extends E> c)
|
void |
clear()
|
boolean |
contains(java.lang.Object elem)
|
boolean |
containsAll(java.util.Collection<?> c)
|
int |
indexOf(java.lang.Object elem)
|
int |
lastIndexOf(java.lang.Object elem)
|
java.util.ListIterator<E> |
listIterator()
|
E |
remove(int index)
|
boolean |
remove(java.lang.Object o)
|
boolean |
removeAll(java.util.Collection<?> c)
|
protected void |
removeRange(int fromIndex,
int toIndex)
|
boolean |
retainAll(java.util.Collection<?> c)
|
E |
set(int index,
E element)
|
| Methods inherited from class java.util.ArrayList |
clone, ensureCapacity, get, isEmpty, iterator, listIterator, size, subList, toArray, toArray, trimToSize |
| Methods inherited from class java.util.AbstractList |
equals, hashCode |
| Methods inherited from class java.util.AbstractCollection |
toString |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
equals, hashCode |
HashList
public HashList()
HashList
public HashList(java.util.Collection<? extends E> c)
add
public boolean add(E o)
- Specified by:
add in interface java.util.Collection<E>- Specified by:
add in interface java.util.List<E>- Overrides:
add in class java.util.ArrayList<E>
add
public void add(int index,
E element)
- Specified by:
add in interface java.util.List<E>- Overrides:
add in class java.util.ArrayList<E>
addAll
public boolean addAll(java.util.Collection<? extends E> c)
- Specified by:
addAll in interface java.util.Collection<E>- Specified by:
addAll in interface java.util.List<E>- Overrides:
addAll in class java.util.ArrayList<E>
addAll
public boolean addAll(int index,
java.util.Collection<? extends E> c)
- Specified by:
addAll in interface java.util.List<E>- Overrides:
addAll in class java.util.ArrayList<E>
clear
public void clear()
- Specified by:
clear in interface java.util.Collection<E>- Specified by:
clear in interface java.util.List<E>- Overrides:
clear in class java.util.ArrayList<E>
contains
public boolean contains(java.lang.Object elem)
- Specified by:
contains in interface java.util.Collection<E>- Specified by:
contains in interface java.util.List<E>- Overrides:
contains in class java.util.ArrayList<E>
containsAll
public boolean containsAll(java.util.Collection<?> c)
- Specified by:
containsAll in interface java.util.Collection<E>- Specified by:
containsAll in interface java.util.List<E>- Overrides:
containsAll in class java.util.AbstractCollection<E>
indexOf
public int indexOf(java.lang.Object elem)
- Specified by:
indexOf in interface java.util.List<E>- Overrides:
indexOf in class java.util.ArrayList<E>
lastIndexOf
public int lastIndexOf(java.lang.Object elem)
- Specified by:
lastIndexOf in interface java.util.List<E>- Overrides:
lastIndexOf in class java.util.ArrayList<E>
remove
public E remove(int index)
- Specified by:
remove in interface java.util.List<E>- Overrides:
remove in class java.util.ArrayList<E>
remove
public boolean remove(java.lang.Object o)
- Specified by:
remove in interface java.util.Collection<E>- Specified by:
remove in interface java.util.List<E>- Overrides:
remove in class java.util.ArrayList<E>
removeAll
public boolean removeAll(java.util.Collection<?> c)
- Specified by:
removeAll in interface java.util.Collection<E>- Specified by:
removeAll in interface java.util.List<E>- Overrides:
removeAll in class java.util.ArrayList<E>
retainAll
public boolean retainAll(java.util.Collection<?> c)
- Specified by:
retainAll in interface java.util.Collection<E>- Specified by:
retainAll in interface java.util.List<E>- Overrides:
retainAll in class java.util.ArrayList<E>
removeRange
protected void removeRange(int fromIndex,
int toIndex)
- Overrides:
removeRange in class java.util.ArrayList<E>
set
public E set(int index,
E element)
- Specified by:
set in interface java.util.List<E>- Overrides:
set in class java.util.ArrayList<E>
listIterator
public java.util.ListIterator<E> listIterator()
- Specified by:
listIterator in interface java.util.List<E>- Overrides:
listIterator in class java.util.ArrayList<E>
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.