public abstract class Parser<T extends BeliefBase> extends Object
| Constructor and Description |
|---|
Parser() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isNumeric(String str)
Checks whether the given string is a number.
|
abstract T |
parseBeliefBase(Reader reader)
Parses the given reader into a belief base of the given type.
|
T |
parseBeliefBase(String text)
Parses the given text into a belief base of the given type.
|
T |
parseBeliefBaseFromFile(String filename)
Parses the file of the given filename into a belief base of the given type.
|
abstract Formula |
parseFormula(Reader reader)
Parses the given reader into a formula of the given type.
|
Formula |
parseFormula(String text)
Parses the given text into a formula of the given type.
|
Formula |
parseFormulaFromFile(String filename)
Parses the file of the given filename into a formula of the given type.
|
public T parseBeliefBaseFromFile(String filename) throws FileNotFoundException, IOException, ParserException
filename - the name of a fileFileNotFoundException - if the file is not foundException - some parsing exceptions may be added here.IOExceptionParserExceptionpublic T parseBeliefBase(String text) throws IOException, ParserException
text - a stringException - some parsing exceptions may be added here.IOExceptionParserExceptionpublic abstract T parseBeliefBase(Reader reader) throws IOException, ParserException
reader - a readerException - some parsing exceptions may be added here.IOExceptionParserExceptionpublic Formula parseFormulaFromFile(String filename) throws FileNotFoundException, IOException, ParserException
filename - the name of a fileFileNotFoundException - if the file is not foundException - some parsing exceptions may be added here.IOExceptionParserExceptionpublic Formula parseFormula(String text) throws IOException, ParserException
text - a stringException - some parsing exceptions may be added here.IOExceptionParserExceptionpublic abstract Formula parseFormula(Reader reader) throws IOException, ParserException
reader - a readerException - some parsing exceptions may be added here.IOExceptionParserExceptionpublic static boolean isNumeric(String str)
str - some stringCopyright © 2018. All rights reserved.