public class BasicCompletionQueue extends CompletionQueue
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
backtracked
Flag set for when the kb is restored - in this case we do not want to flush the queue immediatly
|
protected int |
current
List of current index pointer for each queue
|
protected int |
cutOff
List of current index pointer for the stopping point at each queue
|
protected int |
end
List of current index pointer for each queue
|
protected Set<aterm.ATermAppl> |
newQueue
Set to track duplicates for new elements list for queue
|
protected List<aterm.ATermAppl> |
newQueueList
List to hold new elements for the queue
|
protected List<aterm.ATermAppl> |
queue
The queue - array - each entry is an arraylist for a particular rule type
|
closed, currentType, logabox, index, nodeList, stop| Constructor and Description |
|---|
BasicCompletionQueue(ABox abox)
Constructor - create queue
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(QueueElement x)
Add an element to all queues
|
void |
add(QueueElement x,
NodeSelector s)
Add an element to the queue
|
void |
clearQueue(NodeSelector s)
Clear the queue
|
BasicCompletionQueue |
copy()
Copy the queue
|
protected void |
findNext(int type)
Find the next individual in a given queue
|
void |
flushQueue()
Flush the queue
|
protected void |
flushQueue(NodeSelector s)
Flush the queue
|
boolean |
hasNext()
Test if there is another element on the queue to process
|
void |
incrementBranch(int branch)
Set branch pointers to current pointer.
|
Individual |
next()
Get the next element of a queue of a given type
|
Node |
nextLiteral()
Get the next element of a queue of a given type
|
void |
print()
Print method for entire queue
|
void |
print(int type)
Print method for a given queue type
|
void |
remove()
Remove method for abstract class
|
void |
reset(NodeSelector s)
Reset the cutoff for a given type index
|
void |
restore(int branch)
Reset the queue to be the current nodes in the abox; Also reset the type index to 0
|
void |
setABox(ABox ab)
Set the abox for the queue
|
allowLiterals, getNextLabel, printBranchInfo, setAllowLiterals, setClosedfindNextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingprotected List<aterm.ATermAppl> queue
protected Set<aterm.ATermAppl> newQueue
protected List<aterm.ATermAppl> newQueueList
protected int current
protected int end
protected int cutOff
protected boolean backtracked
public BasicCompletionQueue(ABox abox)
abox - protected void findNext(int type)
findNext in class CompletionQueuetype - public boolean hasNext()
hasNext in interface Iterator<Individual>hasNext in class IndividualIteratortype - public void restore(int branch)
restore in class CompletionQueuebranch - public Individual next()
next in interface Iterator<Individual>next in class IndividualIteratortype - public Node nextLiteral()
nextLiteral in class CompletionQueuetype - public void add(QueueElement x, NodeSelector s)
CompletionQueueadd in class CompletionQueuepublic void add(QueueElement x)
CompletionQueueadd in class CompletionQueuepublic void reset(NodeSelector s)
reset in class CompletionQueuetype - public void incrementBranch(int branch)
incrementBranch in class CompletionQueuebranch - public BasicCompletionQueue copy()
copy in class CompletionQueuepublic void setABox(ABox ab)
setABox in class CompletionQueueab - public void print(int type)
print in class CompletionQueuetype - public void print()
print in class CompletionQueuepublic void remove()
remove in interface Iterator<Individual>remove in class IndividualIteratorpublic void flushQueue()
CompletionQueueflushQueue in class CompletionQueueprotected void flushQueue(NodeSelector s)
CompletionQueueflushQueue in class CompletionQueuepublic void clearQueue(NodeSelector s)
CompletionQueueclearQueue in class CompletionQueueCopyright © 2019. All rights reserved.