Class FattyAcidParser

java.lang.Object
org.lifstools.jgoslin.parser.Parser<LipidAdduct>
org.lifstools.jgoslin.parser.FattyAcidParser

public final class FattyAcidParser extends Parser<LipidAdduct>
Parser implementation for IUPAC Fatty acids nomenclature.
Author:
Dominik Kopczynski, Nils Hoffmann
  • Constructor Details

  • Method Details

    • parse

      public LipidAdduct parse(String text, BaseParserEventHandler eventHandler)
      Description copied from class: Parser
      Parse the given text, constructing the output object of type T using the provided parser event handler.
      Overrides:
      parse in class Parser<LipidAdduct>
      Parameters:
      text - the text to parse.
      eventHandler - the parser event handler to process events created by the parser.
      Returns:
      the parsed object of type T if successful, otherwise an exception will be thrown.
    • parse

      public LipidAdduct parse(String text, BaseParserEventHandler eventHandler, boolean with_exception)
      Description copied from class: Parser
      Parse the given text, constructing the output object of type T using the provided parser event handler.Allows the user to specify, if exceptions should be thrown on errors.
      Overrides:
      parse in class Parser<LipidAdduct>
      Parameters:
      text - the text to parse.
      eventHandler - the parser event handler to process events created by the parser.
      with_exception - if true, throws exception if parsing was not successful.
      Returns:
      the parsed object of type T if successful, otherwise null, if throwError is false.
    • newEventHandler

      public FattyAcidParserEventHandler newEventHandler()
      Specified by:
      newEventHandler in class Parser<LipidAdduct>