Interface FilterableList<T,​S extends FilterableList<T,​S>>

    • Method Summary

      All Methods Instance Methods Abstract 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 getOnly()
      Returns the only element of this list.
      S subList​(int fromIndex, int toIndex)
      • 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, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, toArray, toArray
    • Method Detail

      • filter

        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.
        Parameters:
        elementMatcher - The element matcher to match the elements of this list against.
        Returns:
        A new list only containing the matched elements.
      • getOnly

        T getOnly()
        Returns the only element of this list. If there is not exactly one element in this list, an IllegalStateException is thrown.
        Returns:
        The only element of this list.
      • subList

        S subList​(int fromIndex,
                  int toIndex)
        Specified by:
        subList in interface java.util.List<T>