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

java.lang.Object
com.hello2morrow.sonargraph.core.api.script.model.SearchResult<T>
Type Parameters:
T - Class of access objects contained in the result

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

    • SearchResult

      public SearchResult()
  • Method Details

    • 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 Optional<T> getFirstMatch()
      Returns the first item returned by the search operation.
      Returns:
      Returns the first item returned by the search operation.
    • getAllMatches

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