Package com.piketec.tpt.api
Interface RemoteList<E>
-
- Type Parameters:
E
- the type of elements in this list
- All Superinterfaces:
java.rmi.Remote
,RemoteCollection<E>
,RemoteIterable<E>
,TptRemote
- All Known Subinterfaces:
AssessmentGroup
,ExecutionConfiguration
,ExecutionConfigurationGroup
,RemoteIndexedList<KEY,E>
,ScenarioGroup
,TestSetGroup
,TransitionSpecGroup
- All Known Implementing Classes:
IterableRemoteIndexedList
,IterableRemoteList
public interface RemoteList<E> extends RemoteCollection<E>
An ordered collection of (Remote) elements. Changes to this list will be done directly in TPT.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IterableRemoteList<E>
asIterable()
Provides anIterable
view of thisRemoteIterable
.void
delete(int index)
Removes the element at positionindex
from the list.E
get(int index)
Returns the element at positionindex
.E
move(int from, int to)
Moves an element from the positionfrom
toto
.-
Methods inherited from interface com.piketec.tpt.api.RemoteCollection
clear, contains, containsAll, delete, deleteAll, getItems, isEmpty, retainAll, size
-
Methods inherited from interface com.piketec.tpt.api.util.RemoteIterable
remoteIterator
-
-
-
-
Method Detail
-
get
E get(int index) throws java.lang.IndexOutOfBoundsException, java.rmi.RemoteException
Returns the element at positionindex
.- Parameters:
index
- The position of the element in the list.- Returns:
- The element that is at this position.
- Throws:
java.lang.IndexOutOfBoundsException
- If theindex < 0
orindex >= getItems().size()
java.rmi.RemoteException
- remote communication problem
-
delete
void delete(int index) throws java.lang.IndexOutOfBoundsException, java.rmi.RemoteException
Removes the element at positionindex
from the list.- Parameters:
index
- The position of the item that should be deleted.- Throws:
java.lang.IndexOutOfBoundsException
- If theindex < 0
orindex >= getItems().size()
java.rmi.RemoteException
- remote communication problem
-
move
E move(int from, int to) throws java.lang.IndexOutOfBoundsException, java.rmi.RemoteException
Moves an element from the positionfrom
toto
. All elements in this interval will be shifted accordingly such that no gaps exist afterwards and no items will be overwritten.- Parameters:
from
- The old position of the element.to
- The new position for the element given byfrom
- Returns:
- Returns a reference to the moved item.
- Throws:
java.lang.IndexOutOfBoundsException
- Ifto < 0
orfrom < 0
orto >= getItems().size()
orfrom >= getItems().size()
java.rmi.RemoteException
- remote communication problem
-
asIterable
IterableRemoteList<E> asIterable() throws java.rmi.RemoteException
Description copied from interface:RemoteIterable
Provides anIterable
view of thisRemoteIterable
. This normally usesRemoteIterable.remoteIterator()
and wraps the return value into a realIterator
that throwsRuntimeExceptions
instead ofRemoteExceptions
so that this view can be used in for-each loops.- Specified by:
asIterable
in interfaceRemoteCollection<E>
- Specified by:
asIterable
in interfaceRemoteIterable<E>
- Returns:
- an iterable view of this
RemoteIterable
- Throws:
java.rmi.RemoteException
- remote communication problem- See Also:
ApiIterator
-
-