Package com.semedy.reasoner.api.core
Class ResultEnumeratorThreaded
java.lang.Object
com.semedy.reasoner.api.core.ResultEnumeratorThreaded
- All Implemented Interfaces:
ResultEnumerator,Closeable,AutoCloseable,Cloneable
public class ResultEnumeratorThreaded
extends Object
implements Closeable, Cloneable, ResultEnumerator
enumerator for reasoning results
- Author:
- juergen
-
Constructor Summary
ConstructorsConstructorDescriptionResultEnumeratorThreaded(BlockingQueue<Object> queue, int arity, List<String> variables, CoreReadLock readlock) the producer -
Method Summary
-
Constructor Details
-
ResultEnumeratorThreaded
public ResultEnumeratorThreaded(BlockingQueue<Object> queue, int arity, List<String> variables, CoreReadLock readlock) the producer
-
-
Method Details
-
init
public void init() -
hasMoreElements
Are there more elements?- Specified by:
hasMoreElementsin interfaceResultEnumerator- Returns:
- true if there are more elements
- Throws:
IOException
-
nextElement
Move to next element (the next element is found in the buffer)- Specified by:
nextElementin interfaceResultEnumerator- Throws:
IOException
-
hasFinished
Is the enumerator at the end?- Specified by:
hasFinishedin interfaceResultEnumerator- Returns:
- true if there is no more result
- Throws:
IOException
-
getBuffer
get a result buffer- Specified by:
getBufferin interfaceResultEnumerator- Returns:
- buffer for results
-
close
close the iterator- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceResultEnumerator- Throws:
IOException
-
cloneEnumerator
clone the iterator- Specified by:
cloneEnumeratorin interfaceResultEnumerator- Returns:
- Throws:
IOException
-