Package org.openscience.cdk.io.formats
Class IChemFormatMatcher.MatchResult
java.lang.Object
org.openscience.cdk.io.formats.IChemFormatMatcher.MatchResult
- All Implemented Interfaces:
Comparable<IChemFormatMatcher.MatchResult>
- Enclosing interface:
- IChemFormatMatcher
public static final class IChemFormatMatcher.MatchResult
extends Object
implements Comparable<IChemFormatMatcher.MatchResult>
Simple class holds whether a format matcher matched, when it matched and
what the format was. The result is comparable to be prioritised (lower
match position being favoured).
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
MatchResult
-
-
Method Details
-
matched
public boolean matched()Did the chem format match.- Returns:
- whether the format matched
-
format
What was the format which matched if there was a match (matched()
).- Returns:
- the format which matched
- Throws:
IllegalArgumentException
- there was no match
-
compareTo
Compares the match result with another, results with lower position are ordered before those with higher position.- Specified by:
compareTo
in interfaceComparable<IChemFormatMatcher.MatchResult>
-