Class SearchResult<T extends ElementAccess<? extends com.hello2morrow.sonargraph.core.model.element.NamedElement>>

  • Type Parameters:
    T - Class of access objects contained in the result

    public final class SearchResult<T extends ElementAccess<? extends com.hello2morrow.sonargraph.core.model.element.NamedElement>>
    extends java.lang.Object
    This class is used to return the result of a search operation.
    • Constructor Summary

      Constructors 
      Constructor Description
      SearchResult()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addMatch​(T item)  
      java.util.List<T> getAllMatches()
      Returns all results of the search operation.
      java.util.Optional<T> getFirstMatch()
      Returns the first item returned by the search operation.
      int size()
      Number of items in the search result.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SearchResult

        public SearchResult()
    • Method Detail

      • addMatch

        public void addMatch​(T item)
      • size

        public int size()
        Number of items in the search result.
        Returns:
        Number of items in the search result.
      • getFirstMatch

        public java.util.Optional<T> getFirstMatch()
        Returns the first item returned by the search operation.
        Returns:
        Returns the first item returned by the search operation.
      • getAllMatches

        public java.util.List<T> getAllMatches()
        Returns all results of the search operation.
        Returns:
        Returns all results of the search operation.