public class FileDungTheoryGenerator extends java.lang.Object implements DungTheoryGenerator
Modifier and Type | Field and Description |
---|---|
private java.io.File[] |
files
The files containing Dung theories.
|
private int |
idx
The index of the next theory to be returned.
|
private boolean |
loop
Whether to loop the files indefinitely
|
private Parser<DungTheory> |
parser
A parser for parsing the files.
|
Constructor and Description |
---|
FileDungTheoryGenerator(java.io.File[] files,
Parser<DungTheory> parser,
boolean loop)
Creates a new theory generator for the given files, which
can be parsed by the given parser.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext() |
DungTheory |
next() |
DungTheory |
next(Argument arg)
Generates a new Dung theory where the given argument
is enforced to be in the grounded extension
|
void |
setSeed(long seed)
Set the seed for the generation.
|
private java.io.File[] files
private Parser<DungTheory> parser
private int idx
private boolean loop
public FileDungTheoryGenerator(java.io.File[] files, Parser<DungTheory> parser, boolean loop)
files
- an array of files.parser
- a parser for the files.loop
- whether to loop the files indefinitely.public boolean hasNext()
hasNext
in interface java.util.Iterator<DungTheory>
hasNext
in interface DungTheoryGenerator
hasNext
in interface BeliefSetIterator<Argument,DungTheory>
public DungTheory next()
next
in interface java.util.Iterator<DungTheory>
next
in interface DungTheoryGenerator
next
in interface BeliefSetIterator<Argument,DungTheory>
public DungTheory next(Argument arg)
DungTheoryGenerator
next
in interface DungTheoryGenerator
arg
- an argument that is enforced
to be in the grounded extension of the generated theory.public void setSeed(long seed)
DungTheoryGenerator
setSeed
in interface DungTheoryGenerator
seed
- some seed.