public class PrologFile extends Object implements Iterator<PrologFile.Term>
| Modifier and Type | Class and Description |
|---|---|
static class |
PrologFile.Term
Term -- it can contain a text and a content (set of terms)
|
| Constructor and Description |
|---|
PrologFile(String file) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext() |
PrologFile.Term |
next() |
static List<PrologFile.Term> |
readTermsFromStream(InputStream is,
String term)
Reads a prolog file.
|
void |
remove() |
static void |
writeTerms(PrintWriter pw,
List<PrologFile.Term> terms)
Writes a set of terms.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic PrologFile(String file) throws IOException
IOExceptionpublic static List<PrologFile.Term> readTermsFromStream(InputStream is, String term) throws IOException
is - input streamterm - term to readIOException - an exceptionpublic static void writeTerms(PrintWriter pw, List<PrologFile.Term> terms) throws IOException
pw - print writerterms - list of terms to writeIOException - an exceptionpublic boolean hasNext()
hasNext in interface Iterator<PrologFile.Term>public PrologFile.Term next()
next in interface Iterator<PrologFile.Term>public void remove()
remove in interface Iterator<PrologFile.Term>