public class TdbMessageProvidingList<E> extends TdbMessageProvider implements java.util.List<E>
Constructor and Description |
---|
TdbMessageProvidingList(TdbMessageProvidingList<E> r)
Copy constructor, used to derive a list from an existing list
|
TdbMessageProvidingList(TdbSession session,
TdbInterfaceType type)
Constructor, should only be used by a derived class
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(E o)
Add a new element to the list
|
void |
add(int index,
E o)
Add a new element to the list at the provided position
|
boolean |
addAll(java.util.Collection<? extends E> c)
Add the contents of the provided collection to the current list
|
boolean |
addAll(int index,
java.util.Collection<? extends E> c)
Insert the contents of the provided collection at the provided offset
into the current list
|
void |
clear()
Remove all content from the current list
|
boolean |
contains(java.lang.Object o)
Check if the list contains a specific element
|
boolean |
containsAll(java.util.Collection<?> c)
Check if all elements in the provided collection are contained within the current list
|
E |
get(int index)
Retrieve the strongly-typed element at the provided offset
|
int |
indexOf(java.lang.Object o)
Retrieve the offset within the list at which the provided object
exists, if any
|
boolean |
isEmpty()
Test the list for emptiness
|
java.util.Iterator<E> |
iterator()
Retrieve an iterator over the list, suitable for use in the for-each coding pattern
|
int |
lastIndexOf(java.lang.Object o)
Retrieve the offset of the most highly-ordered element that matches the provided object
|
java.util.ListIterator<E> |
listIterator()
Retrieve an iterator over the list
|
java.util.ListIterator<E> |
listIterator(int index)
Retrieve an iterator over the list
|
E |
remove(int index)
Remove and return the item at the provided offset
|
boolean |
remove(java.lang.Object o)
Remove the provided object from the list, if found
|
boolean |
removeAll(java.util.Collection<?> c)
Remove all items from the list that match objects in the provided collection
|
boolean |
retainAll(java.util.Collection<?> c)
Removes all items from the list that are not contained within the provided collection
|
E |
set(int index,
E element)
Modify the list to set the item at the provided offset to the provided content
|
int |
size()
Retrieve the number of objects contained within the list
|
java.util.List<E> |
subList(int fromIndex,
int toIndex)
Retrieve a new list object that contains elements within a range of the current list
|
java.lang.Object[] |
toArray()
Retrieve an array containing elements from the list, in proper sequence
|
<T> T[] |
toArray(T[] a)
Returns an array containing all of the elements in this list in proper
sequence; the runtime type of the returned array is that of the
specified array.
|
codeList, getLastCode, getLastMessage, hasMessages, messageList, resetMessages
cancel, getSession, isCancelable, setCancelable
public TdbMessageProvidingList(TdbSession session, TdbInterfaceType type) throws TdbException
session
- Active sessiontype
- Type of connection for which this list is validTdbException
public TdbMessageProvidingList(TdbMessageProvidingList<E> r) throws TdbException
r
- Existing list from which to copyTdbException
public boolean add(E o)
public void add(int index, E o)
add
in interface java.util.List<E>
index
- Offset at which to insert new elemento
- New element to insertpublic boolean addAll(java.util.Collection<? extends E> c)
public boolean addAll(int index, java.util.Collection<? extends E> c)
addAll
in interface java.util.List<E>
index
- Offset at which to start insertingc
- Collection to copypublic void clear()
public boolean contains(java.lang.Object o)
public boolean containsAll(java.util.Collection<?> c)
public E get(int index)
get
in interface java.util.List<E>
index
- Offset from which to retrieve the elementpublic int indexOf(java.lang.Object o)
indexOf
in interface java.util.List<E>
o
- The object for which to retrieve the offsetpublic boolean isEmpty()
public java.util.Iterator<E> iterator()
public int lastIndexOf(java.lang.Object o)
lastIndexOf
in interface java.util.List<E>
o
- Object for which to searchpublic java.util.ListIterator<E> listIterator()
listIterator
in interface java.util.List<E>
public java.util.ListIterator<E> listIterator(int index)
listIterator
in interface java.util.List<E>
public boolean remove(java.lang.Object o)
public E remove(int index)
remove
in interface java.util.List<E>
index
- The index from which to remove the itempublic boolean removeAll(java.util.Collection<?> c)
public boolean retainAll(java.util.Collection<?> c)
public E set(int index, E element)
set
in interface java.util.List<E>
index
- The offset of the item to modifyelement
- The new content for the provided offsetpublic int size()
public java.util.List<E> subList(int fromIndex, int toIndex)
subList
in interface java.util.List<E>
fromIndex
- the offset at which the operation is to begintoIndex
- the offset at which the operation is to stoppublic java.lang.Object[] toArray()
public <T> T[] toArray(T[] a)
toArray
in interface java.util.Collection<E>
toArray
in interface java.util.List<E>
a
- the array into which elements of this list are to be stored; if this
array is not big enough, another array will be allocated of the same runtime type.