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 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.
-
-
-
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.
-
-