Interface RemoteList<E>

    • Method Detail

      • get

        E get​(int index)
        throws java.lang.IndexOutOfBoundsException,
              java.rmi.RemoteException
        Returns the element at position index.
        Parameters:
        index - The position of the element in the list.
        Returns:
        The element that is at this position.
        Throws:
        java.lang.IndexOutOfBoundsException - If the index < 0 or index >= getItems().size()
        java.rmi.RemoteException - remote communication problem
      • delete

        void delete​(int index)
             throws java.lang.IndexOutOfBoundsException,
                    java.rmi.RemoteException
        Removes the element at position index from the list.
        Parameters:
        index - The position of the item that should be deleted.
        Throws:
        java.lang.IndexOutOfBoundsException - If the index < 0 or index >= 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 position from to to. 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 by from
        Returns:
        Returns a reference to the moved item.
        Throws:
        java.lang.IndexOutOfBoundsException - If to < 0 or from < 0 or to >= getItems().size() or from >= getItems().size()
        java.rmi.RemoteException - remote communication problem
      • asIterable

        IterableRemoteList<E> asIterable()
                                  throws java.rmi.RemoteException
        Description copied from interface: RemoteIterable
        Provides an Iterable view of this RemoteIterable. This normally uses RemoteIterable.remoteIterator() and wraps the return value into a real Iterator that throws RuntimeExceptions instead of RemoteExceptions so that this view can be used in for-each loops.
        Specified by:
        asIterable in interface RemoteCollection<E>
        Specified by:
        asIterable in interface RemoteIterable<E>
        Returns:
        an iterable view of this RemoteIterable
        Throws:
        java.rmi.RemoteException - remote communication problem
        See Also:
        ApiIterator