Class ConcurrentListWrapper<E,W extends List<E>>

All Implemented Interfaces:
Iterable<E>, Collection<E>, List<E>, SizedCollection

public class ConcurrentListWrapper<E,W extends List<E>> extends ConcurrentCollectionWrapper<E,W> implements List<E>
  • Constructor Details

    • ConcurrentListWrapper

      protected ConcurrentListWrapper(@NotNull W wrapped, @NotNull @NotNull Lock readLock, @NotNull @NotNull Lock writeLock)
  • Method Details

    • create

      @NotNull public static <E> @NotNull List<E> create(@NonNull @NonNull List<E> wrapped)
    • addAll

      public boolean addAll(int index, @NonNull @NonNull Collection<? extends E> elements)
      Specified by:
      addAll in interface List<E>
    • replaceAll

      public void replaceAll(@NonNull @NonNull UnaryOperator<E> operator)
      Specified by:
      replaceAll in interface List<E>
    • sort

      public void sort(@NonNull @NonNull Comparator<? super E> comparator)
      Specified by:
      sort in interface List<E>
    • get

      public E get(int index)
      Specified by:
      get in interface List<E>
    • set

      public E set(int index, E element)
      Specified by:
      set in interface List<E>
    • add

      public void add(int index, E element)
      Specified by:
      add in interface List<E>
    • remove

      public E remove(int index)
      Specified by:
      remove in interface List<E>
    • indexOf

      public int indexOf(Object o)
      Specified by:
      indexOf in interface List<E>
    • lastIndexOf

      public int lastIndexOf(Object o)
      Specified by:
      lastIndexOf in interface List<E>
    • listIterator

      @NotNull public @NotNull ListIterator<E> listIterator()
      Specified by:
      listIterator in interface List<E>
    • listIterator

      @NotNull public @NotNull ListIterator<E> listIterator(int index)
      Specified by:
      listIterator in interface List<E>
    • subList

      @NotNull public @NotNull List<E> subList(int fromIndex, int toIndex)
      Specified by:
      subList in interface List<E>