Interface ILinkedList<E>

Type Parameters:
E - is the type of the elements of a ILinkedList.
All Superinterfaces:
AggregationRequestable<E>, ArrayMappable<E>, Clearable, Copyable<ILinkedList<E>>, CountRequestable<E>, EmptinessRequestable, Filterable<E>, Groupable<E>, IContainer<E>, IFilteringContainerViewProvider<E>, IIntervallContainerViewProvider<E>, IMappingContainerViewProvider<E>, IndexRequestable<E>, Iterable<E>, IterableWithCopyableIterator<E>, Mappable<E>, MaterializationRequestable, SingleSearchable<E>, StoringRequestable<E>, StringMappable
All Known Implementing Classes:
LinkedList

public interface ILinkedList<E> extends Clearable, Copyable<ILinkedList<E>>, IContainer<E>
A ILinkedList is a IContainer that can add and remove elements.
Author:
Silvan Wyss
  • Method Details

    • addAtBegin

      void addAtBegin(E element)
      Adds the given element at the begin of the current ILinkedList.
      Parameters:
      element -
      Throws:
      RuntimeException - if the given elements is null.
    • addAtBegin

      void addAtBegin(E... elements)
      Adds the given elements at the begin of the current ILinkedList. The elements will be added in the given order.
      Parameters:
      elements -
      Throws:
      RuntimeException - if the given elements is null.
      RuntimeException - if one of the given elements is null.
    • addAtBegin

      void addAtBegin(Iterable<? extends E> elements)
      Adds the given elements at the begin of the current ILinkedList. The elements will be added in the given order.
      Parameters:
      elements -
      Throws:
      RuntimeException - if one of the given elements is null.
    • addAtEnd

      void addAtEnd(E element)
      Adds the given element at the end of the current ILinkedList.
      Parameters:
      element -
      Throws:
      RuntimeException - if the given elements is null.
    • addAtEnd

      void addAtEnd(E... elements)
      Adds the given elements at the end of the current ILinkedList. The elements will be added in the given order.
      Parameters:
      elements -
      Throws:
      RuntimeException - if the given elements is null.
      RuntimeException - if one of the given elements is null.
    • addAtEnd

      void addAtEnd(Iterable<? extends E> elements)
      Adds the given elements at the end of the current ILinkedList. The elements will be added in the given order.
      Parameters:
      elements -
      Throws:
      RuntimeException - if one of the given elements is null.
    • removeAll

      void removeAll(Predicate<E> selector)
      Removes all elements from the current ILinkedList the given selector selects.
      Parameters:
      selector -
    • removeAllOccurrencesOf

      void removeAllOccurrencesOf(Object element)
      Removes all occurrences of the given element from the current ILinkedList.
      Parameters:
      element -
    • removeAndGetStoredFirst

      E removeAndGetStoredFirst()
      Removes and returns the first element of the current ILinkedList.
      Returns:
      the first element of the current ILinkedList.
      Throws:
      RuntimeException - if the current ILinkedList is empty.
    • removeAndGetStoredFirst

      E removeAndGetStoredFirst(Predicate<E> selector)
      Removes and returns the first element the given selector selects from the current ILinkedList.
      Parameters:
      selector -
      Returns:
      the first element the given selector selects from the current ILinkedList.
      Throws:
      RuntimeException - if the current ILinkedList does not contain an element the given selector selects.
    • removeAndGetStoredLast

      E removeAndGetStoredLast()
      Removes and returns the last element of the current ILinkedList.
      Returns:
      the last element of the current ILinkedList.
      Throws:
      RuntimeException - if the current ILinkedList is empty.
    • removeFirst

      void removeFirst()
      Removes the first element from the current ILinkedList.
    • removeFirstStrictly

      void removeFirstStrictly()
      Removes the first element from the current ILinkedList.
      Throws:
      RuntimeException - if the current ILinkedList is empty.
    • removeFirst

      void removeFirst(Predicate<E> selector)
      Removes the first element the given selector selects from the current ILinkedList
      Parameters:
      selector -
    • removeFirstOccurrenceOf

      void removeFirstOccurrenceOf(Object element)
      Removes the first occurrence of the given element from the current ILinkedList.
      Parameters:
      element -
    • removeLast

      void removeLast()
      Removes the last element from the current ILinkedList.
    • removeLastStrictly

      void removeLastStrictly()
      Removes the last element from the current ILinkedList.
      Throws:
      RuntimeException - if the current ILinkedList is empty.
    • removeStrictlyFirstOccurrenceOf

      void removeStrictlyFirstOccurrenceOf(Object element)
      Removes the first occurrence of the given element from the current ILinkedList.
      Parameters:
      element -
      Throws:
      RuntimeException - if the current ILinkedList does not contain the given element.
    • replaceFirst

      void replaceFirst(Predicate<E> selector, E element)
      Replaces the first element the given selector selects from the current ILinkedList with the given element.
      Parameters:
      selector -
      element -
      Throws:
      RuntimeException - if the given element is null.