Interface ExtendedBufferList<T>

  • All Superinterfaces:
    BufferList<T>, java.util.Collection<T>, java.lang.Iterable<T>

    public interface ExtendedBufferList<T>
    extends BufferList<T>
    An extension of BufferList which can maintain its sorted state and eagerly remove duplicates when elements are inserted.
    Since:
    3.1.1
    Author:
    Pavel Klinov
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void filterDuplicates()
      Eagerly removes duplicates from the underlying buffer; does not change the relative order of distinct elements.
      ExtendedBufferList<T> sort​(java.util.Comparator<? super T> theComparator)  
      com.google.common.collect.PeekingIterator<T> uniqueIterator()
      Lazy elimination of duplicates.
      • Methods inherited from interface java.util.Collection

        addAll, contains, containsAll, equals, hashCode, parallelStream, remove, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArray, toArray
      • Methods inherited from interface java.lang.Iterable

        forEach
    • Method Detail

      • filterDuplicates

        void filterDuplicates()
        Eagerly removes duplicates from the underlying buffer; does not change the relative order of distinct elements. Thus filtering duplicates can potentially reduce the size of the list but it will retain any existing ordering.
      • uniqueIterator

        com.google.common.collect.PeekingIterator<T> uniqueIterator()
        Lazy elimination of duplicates. sort(Comparator) has to be called prior to this method.
        Returns:
        an iterator which lazily eliminates duplicates.