Class SortedArrayList<T>

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<T>, java.util.Collection<T>, java.util.List<T>, java.util.RandomAccess

    public class SortedArrayList<T>
    extends java.util.ArrayList<T>
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class java.util.AbstractList

        modCount
    • Constructor Summary

      Constructors 
      Constructor Description
      SortedArrayList​(java.util.Comparator<T> comparator)  
      SortedArrayList​(java.util.Comparator<T> comparator, int initialCapacity)  
      SortedArrayList​(java.util.Comparator<T> comparator, @NotNull java.util.Collection<? extends T> c)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(int index, T element)  
      boolean add​(T t)  
      boolean addAll​(int index, java.util.Collection<? extends T> c)  
      boolean addAll​(java.util.Collection<? extends T> c)  
      void forEach​(java.util.function.Consumer<? super T> action)  
      void forEachAfter​(T t, java.util.function.Consumer<? super T> action)  
      void forEachBefore​(T t, java.util.function.Consumer<? super T> action)  
      boolean removeIfAfter​(T t, java.util.function.Consumer<? super T> action)  
      boolean removeIfBefore​(T t, java.util.function.Consumer<? super T> action)  
      void sort​(java.util.Comparator<? super T> c)  
      @NotNull java.util.List<T> subList​(int fromIndex, int toIndex)  
      • Methods inherited from class java.util.ArrayList

        clear, clone, contains, ensureCapacity, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, spliterator, toArray, toArray, trimToSize
      • Methods inherited from class java.util.AbstractCollection

        containsAll, toString
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, stream, toArray
      • Methods inherited from interface java.util.List

        containsAll
    • Constructor Detail

      • SortedArrayList

        public SortedArrayList​(java.util.Comparator<T> comparator,
                               int initialCapacity)
      • SortedArrayList

        public SortedArrayList​(java.util.Comparator<T> comparator)
      • SortedArrayList

        public SortedArrayList​(java.util.Comparator<T> comparator,
                               @NotNull
                               @NotNull java.util.Collection<? extends T> c)
    • Method Detail

      • add

        public boolean add​(T t)
        Specified by:
        add in interface java.util.Collection<T>
        Specified by:
        add in interface java.util.List<T>
        Overrides:
        add in class java.util.ArrayList<T>
      • forEachBefore

        public void forEachBefore​(T t,
                                  java.util.function.Consumer<? super T> action)
      • forEachAfter

        public void forEachAfter​(T t,
                                 java.util.function.Consumer<? super T> action)
      • removeIfBefore

        public boolean removeIfBefore​(T t,
                                      java.util.function.Consumer<? super T> action)
      • removeIfAfter

        public boolean removeIfAfter​(T t,
                                     java.util.function.Consumer<? super T> action)
      • add

        public void add​(int index,
                        T element)
        Specified by:
        add in interface java.util.List<T>
        Overrides:
        add in class java.util.ArrayList<T>
      • addAll

        public boolean addAll​(java.util.Collection<? extends T> c)
        Specified by:
        addAll in interface java.util.Collection<T>
        Specified by:
        addAll in interface java.util.List<T>
        Overrides:
        addAll in class java.util.ArrayList<T>
      • addAll

        public boolean addAll​(int index,
                              java.util.Collection<? extends T> c)
        Specified by:
        addAll in interface java.util.List<T>
        Overrides:
        addAll in class java.util.ArrayList<T>
      • subList

        @NotNull
        public @NotNull java.util.List<T> subList​(int fromIndex,
                                                  int toIndex)
        Specified by:
        subList in interface java.util.List<T>
        Overrides:
        subList in class java.util.ArrayList<T>
      • forEach

        public void forEach​(java.util.function.Consumer<? super T> action)
        Specified by:
        forEach in interface java.lang.Iterable<T>
        Overrides:
        forEach in class java.util.ArrayList<T>
      • sort

        public void sort​(java.util.Comparator<? super T> c)
        Specified by:
        sort in interface java.util.List<T>
        Overrides:
        sort in class java.util.ArrayList<T>