public final class AttachmentList<E> extends Object implements List<E>, RandomAccess
List meant for use with an Attachable object. The list is thread safe and performs
run time type checking of all insertions. Iterators do not
support modifications.| Constructor and Description |
|---|
AttachmentList(Class<E> valueClass)
Creates a new
AttachmentList. |
AttachmentList(Collection<? extends E> c,
Class<E> valueClass)
Creates a new
AttachmentList. |
AttachmentList(int initialCapacity,
Class<E> valueClass)
Deprecated.
use
new AttachmentList<>(valueClass) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E e) |
void |
add(int index,
E element) |
boolean |
addAll(Collection<? extends E> c) |
boolean |
addAll(int index,
Collection<? extends E> c) |
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
boolean |
equals(Object o) |
E |
get(int index) |
Class<E> |
getValueClass() |
int |
hashCode() |
int |
indexOf(Object o) |
boolean |
isEmpty() |
Iterator<E> |
iterator() |
int |
lastIndexOf(Object o) |
ListIterator<E> |
listIterator() |
ListIterator<E> |
listIterator(int index) |
E |
remove(int index) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
E |
set(int index,
E element) |
int |
size() |
List<E> |
subList(int fromIndex,
int toIndex) |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitreplaceAll, sort, spliteratorparallelStream, removeIf, stream@Deprecated public AttachmentList(int initialCapacity, Class<E> valueClass)
new AttachmentList<>(valueClass)AttachmentList.initialCapacity - ignoredvalueClass - the type of element the list is permitted to holdpublic AttachmentList(Class<E> valueClass)
AttachmentList.valueClass - the type of element the list is permitted to holdpublic AttachmentList(Collection<? extends E> c, Class<E> valueClass)
AttachmentList.c - initial contents of the list. Cannot be nullvalueClass - the type of element the list is permitted to holdpublic int size()
public boolean isEmpty()
public boolean contains(Object o)
public Iterator<E> iterator()
Modifications (i.e. remove calls) throw UnsupportedOperationException.
public Object[] toArray()
public <T> T[] toArray(T[] a)
public boolean add(E e)
public boolean remove(Object o)
public boolean containsAll(Collection<?> c)
containsAll in interface Collection<E>containsAll in interface List<E>public boolean addAll(Collection<? extends E> c)
public boolean addAll(int index,
Collection<? extends E> c)
public boolean removeAll(Collection<?> c)
public boolean retainAll(Collection<?> c)
public void clear()
public boolean equals(Object o)
public int hashCode()
public int lastIndexOf(Object o)
lastIndexOf in interface List<E>public ListIterator<E> listIterator()
Modifications (i.e. remove, @{code set} and add calls) throw UnsupportedOperationException.
listIterator in interface List<E>public ListIterator<E> listIterator(int index)
Modifications (i.e. remove, @{code set} and add calls) throw UnsupportedOperationException.
listIterator in interface List<E>Copyright © 2019 JBoss by Red Hat. All rights reserved.