Interface ElementCollection<T>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.List<T> findElements​(java.util.function.Predicate<? super T> predicate)
      Returns all elements which match the given predicate
      T findFirstElement​(java.util.function.Predicate<? super T> predicate)
      Returns the first element which matches the given predicate
      java.util.List<T> getElements()
      Returns all elements
    • Method Detail

      • getElements

        java.util.List<T> getElements()
        Returns all elements
        Returns:
        all elements
        Since:
        2.0.0
      • findElements

        java.util.List<T> findElements​(java.util.function.Predicate<? super T> predicate)
        Returns all elements which match the given predicate
        Parameters:
        predicate - the predicate for finding the elements
        Returns:
        all elements which match the given predicate
        Since:
        2.0.0
      • findFirstElement

        T findFirstElement​(java.util.function.Predicate<? super T> predicate)
        Returns the first element which matches the given predicate
        Parameters:
        predicate - the predicate for selecting the element
        Returns:
        all elements which match the given predicate, cannot be null
        Throws:
        java.util.NoSuchElementException - thrown if no element matches the given predicate
        Since:
        2.0.0