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

    • 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 List<T>