Class FilterableList.Empty<T,​S extends FilterableList<T,​S>>

    • Field Summary

      • Fields inherited from class java.util.AbstractList

        modCount
    • Constructor Summary

      Constructors 
      Constructor Description
      Empty()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      S filter​(ElementMatcher<? super T> elementMatcher)
      Filters any elements in this lists by the given elementMatcher and returns a list that are matched by the given matcher.
      T get​(int index)
      T getOnly()
      Returns the only element of this list.
      int size()
      S subList​(int fromIndex, int toIndex)
      • Methods inherited from class java.util.AbstractList

        add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set
      • 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, removeIf, stream, toArray
      • Methods inherited from interface java.lang.Iterable

        forEach
      • Methods inherited from interface java.util.List

        add, add, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, sort, spliterator, toArray, toArray
    • Constructor Detail

      • Empty

        public Empty()
    • Method Detail

      • get

        public T get​(int index)
        Specified by:
        get in interface java.util.List<T>
        Specified by:
        get in class java.util.AbstractList<T>
      • size

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

        public T getOnly()
        Returns the only element of this list. If there is not exactly one element in this list, an IllegalStateException is thrown.
        Specified by:
        getOnly in interface FilterableList<T,​S extends FilterableList<T,​S>>
        Returns:
        The only element of this list.
      • filter

        public S filter​(ElementMatcher<? super T> elementMatcher)
        Filters any elements in this lists by the given elementMatcher and returns a list that are matched by the given matcher.
        Specified by:
        filter in interface FilterableList<T,​S extends FilterableList<T,​S>>
        Parameters:
        elementMatcher - The element matcher to match the elements of this list against.
        Returns:
        A new list only containing the matched elements.
      • subList

        public S subList​(int fromIndex,
                         int toIndex)
        Specified by:
        subList in interface FilterableList<T,​S extends FilterableList<T,​S>>
        Specified by:
        subList in interface java.util.List<T>
        Overrides:
        subList in class java.util.AbstractList<T>