Package com.tietoenator.trip.jxp
Class TdbMessageProvidingList<E>
java.lang.Object
com.tietoenator.trip.jxp.session.TdbSessionObject
com.tietoenator.trip.jxp.TdbMessageProvider
com.tietoenator.trip.jxp.TdbMessageProvidingList<E>
- All Implemented Interfaces:
Iterable<E>
,Collection<E>
,List<E>
- Direct Known Subclasses:
TdbControlObjectList
-
Constructor Summary
ConstructorsConstructorDescriptionTdbMessageProvidingList
(TdbSession session, TdbInterfaceType type) Constructor, should only be used by a derived classCopy constructor, used to derive a list from an existing list -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a new element to the list at the provided positionboolean
Add a new element to the listboolean
addAll
(int index, Collection<? extends E> c) Insert the contents of the provided collection at the provided offset into the current listboolean
addAll
(Collection<? extends E> c) Add the contents of the provided collection to the current listvoid
clear()
Remove all content from the current listboolean
Check if the list contains a specific elementboolean
containsAll
(Collection<?> c) Check if all elements in the provided collection are contained within the current listget
(int index) Retrieve the strongly-typed element at the provided offsetint
Retrieve the offset within the list at which the provided object exists, if anyboolean
isEmpty()
Test the list for emptinessiterator()
Retrieve an iterator over the list, suitable for use in the for-each coding patternint
Retrieve the offset of the most highly-ordered element that matches the provided objectRetrieve an iterator over the listlistIterator
(int index) Retrieve an iterator over the listremove
(int index) Remove and return the item at the provided offsetboolean
Remove the provided object from the list, if foundboolean
removeAll
(Collection<?> c) Remove all items from the list that match objects in the provided collectionboolean
retainAll
(Collection<?> c) Removes all items from the list that are not contained within the provided collectionModify the list to set the item at the provided offset to the provided contentint
size()
Retrieve the number of objects contained within the listsubList
(int fromIndex, int toIndex) Retrieve a new list object that contains elements within a range of the current listObject[]
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.Methods inherited from class com.tietoenator.trip.jxp.TdbMessageProvider
codeList, getLastCode, getLastMessage, hasMessages, messageList, resetMessages
Methods inherited from class com.tietoenator.trip.jxp.session.TdbSessionObject
cancel, getSession, isCancelable, setCancelable
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
equals, hashCode, replaceAll, sort, spliterator
-
Constructor Details
-
TdbMessageProvidingList
Constructor, should only be used by a derived class- Parameters:
session
- Active sessiontype
- Type of connection for which this list is valid- Throws:
TdbException
-
TdbMessageProvidingList
Copy constructor, used to derive a list from an existing list- Parameters:
r
- Existing list from which to copy- Throws:
TdbException
-
-
Method Details
-
add
Add a new element to the list -
add
Add a new element to the list at the provided position -
addAll
Add the contents of the provided collection to the current list -
addAll
Insert the contents of the provided collection at the provided offset into the current list -
clear
public void clear()Remove all content from the current list -
contains
Check if the list contains a specific element -
containsAll
Check if all elements in the provided collection are contained within the current list- Specified by:
containsAll
in interfaceCollection<E>
- Specified by:
containsAll
in interfaceList<E>
- Parameters:
c
- Collection of elements to test for containment- Returns:
- true/false depending on whether the objects in the collection are all contained within the list
-
get
Retrieve the strongly-typed element at the provided offset -
indexOf
Retrieve the offset within the list at which the provided object exists, if any -
isEmpty
public boolean isEmpty()Test the list for emptiness -
iterator
Retrieve an iterator over the list, suitable for use in the for-each coding pattern -
lastIndexOf
Retrieve the offset of the most highly-ordered element that matches the provided object- Specified by:
lastIndexOf
in interfaceList<E>
- Parameters:
o
- Object for which to search- Returns:
- right-most offset
-
listIterator
Retrieve an iterator over the list- Specified by:
listIterator
in interfaceList<E>
- Returns:
- The list iterator
-
listIterator
Retrieve an iterator over the list- Specified by:
listIterator
in interfaceList<E>
- Returns:
- The list iterator
-
remove
Remove the provided object from the list, if found -
remove
Remove and return the item at the provided offset -
removeAll
Remove all items from the list that match objects in the provided collection -
retainAll
Removes all items from the list that are not contained within the provided collection -
set
Modify the list to set the item at the provided offset to the provided content -
size
public int size()Retrieve the number of objects contained within the list -
subList
Retrieve a new list object that contains elements within a range of the current list -
toArray
Retrieve an array containing elements from the list, in proper sequence -
toArray
public <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.- Specified by:
toArray
in interfaceCollection<E>
- Specified by:
toArray
in interfaceList<E>
- Parameters:
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.- Returns:
- the array into which elements were stored; might be different from the provided array if the provided array was too small, but the runtime types will match.
-