- java.lang.Object
-
- org.scijava.ops.engine.matcher.MatchingResult
-
public class MatchingResult extends Object
Class representing the result from type matching done by aMatchingRoutine. Contains the original candidates which match the types specified byOpRequestand the final matches that match all inputs, outputs, and arguments.- Author:
- David Kolb
-
-
Constructor Summary
Constructors Constructor Description MatchingResult(List<OpCandidate> candidates, List<OpCandidate> matches, List<OpRequest> originalQueries)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MatchingResultempty(List<OpRequest> originalQueries)List<OpCandidate>getCandidates()List<OpCandidate>getMatches()List<OpRequest>getOriginalQueries()static StringmatchInfo(MatchingResult res)Gets a string with an analysis of a particular match request failure.OpCandidatesingleMatch()
-
-
-
Constructor Detail
-
MatchingResult
public MatchingResult(List<OpCandidate> candidates, List<OpCandidate> matches, List<OpRequest> originalQueries)
-
-
Method Detail
-
empty
public static MatchingResult empty(List<OpRequest> originalQueries)
-
getCandidates
public List<OpCandidate> getCandidates()
-
getMatches
public List<OpCandidate> getMatches()
-
singleMatch
public OpCandidate singleMatch()
-
matchInfo
public static String matchInfo(MatchingResult res)
Gets a string with an analysis of a particular match request failure.This method is used to generate informative exception messages when no matches, or too many matches, are found.
- Parameters:
res- The result of type matching- Returns:
- A multi-line string describing the situation: 1) the type of match failure; 2) the list of matching ops (if any); 3) the request itself; and 4) the list of candidates including status (i.e., whether it matched, and if not, why not).
-
-