Class Lists.TransformingSequentialList<F,​T>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.util.List<F> fromList  
      (package private) Function<? super F,​? extends T> function  
      private static long serialVersionUID  
      • Fields inherited from class java.util.AbstractList

        modCount
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()
      The default implementation inherited is based on iteration and removal of each element which can be overkill.
      java.util.ListIterator<T> listIterator​(int index)  
      boolean removeIf​(java.util.function.Predicate<? super T> filter)  
      int size()  
      • Methods inherited from class java.util.AbstractSequentialList

        add, addAll, get, iterator, remove, set
      • Methods inherited from class java.util.AbstractList

        add, equals, hashCode, indexOf, lastIndexOf, listIterator, removeRange, subList
      • Methods inherited from class java.util.AbstractCollection

        addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
      • Methods inherited from class java.lang.Object

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

        parallelStream, stream, toArray
      • Methods inherited from interface java.lang.Iterable

        forEach
      • Methods inherited from interface java.util.List

        addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
    • Field Detail

      • fromList

        final java.util.List<F> fromList
      • function

        final Function<? super F,​? extends T> function
    • Constructor Detail

      • TransformingSequentialList

        TransformingSequentialList​(java.util.List<F> fromList,
                                   Function<? super F,​? extends T> function)
    • Method Detail

      • clear

        public void clear()
        The default implementation inherited is based on iteration and removal of each element which can be overkill. That's why we forward this call directly to the backing list.
        Specified by:
        clear in interface java.util.Collection<F>
        Specified by:
        clear in interface java.util.List<F>
        Overrides:
        clear in class java.util.AbstractList<T>
      • size

        public int size()
        Specified by:
        size in interface java.util.Collection<F>
        Specified by:
        size in interface java.util.List<F>
        Specified by:
        size in class java.util.AbstractCollection<T>
      • listIterator

        public java.util.ListIterator<T> listIterator​(int index)
        Specified by:
        listIterator in interface java.util.List<F>
        Specified by:
        listIterator in class java.util.AbstractSequentialList<T>
      • removeIf

        public boolean removeIf​(java.util.function.Predicate<? super T> filter)
        Specified by:
        removeIf in interface java.util.Collection<F>