Package org.openscience.cdk.smarts
Class SmartsResult
java.lang.Object
org.openscience.cdk.smarts.SmartsResult
The result of parsing a SMARTS. The result indicates if the input was parsed
OK or not (
ok(), if the parse was not OK an error message and
location is set.- Author:
- John Mayfield
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondisplayErrorLocation(int pos) Displays where the error occurred on the input string.intgetAtomLocation(int idx) intgetBondLocation(int idx) The error/warning message.intThe position (string index) in the input that was interpreted.booleanok()Was the SMARTS parsed ok.
-
Method Details
-
getMessage
The error/warning message.- Returns:
- the message
-
getAtomLocation
public int getAtomLocation(int idx) -
getBondLocation
public int getBondLocation(int idx) -
displayErrorLocation
-
displayErrorLocation
Displays where the error occurred on the input string.- Returns:
- the error location
-
ok
public boolean ok()Was the SMARTS parsed ok.- Returns:
- parse was OK.
-
getPosition
public int getPosition()The position (string index) in the input that was interpreted.- Returns:
- the position
-