public class CollectionItemsStore extends Object implements ClauseStore
Constructor and Description |
---|
CollectionItemsStore(Prolog engine,
Collection C,
Term item,
List varList,
JavaLibrary lib) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Clause the store and free any external resources or caches associated
with it.
|
ClauseInfo |
fetch()
Get the next clause compatible with the current goal.
|
boolean |
hasCompatibleClause()
Return
true if there are more clauses compatible with the current
goal, irrespective of local variable bindings. |
boolean |
haveAlternatives()
Return
true if there are more clauses available compatible with
the current goal and false otherwise. |
public CollectionItemsStore(Prolog engine, Collection C, Term item, List varList, JavaLibrary lib)
public void close()
ClauseStore
Clause the store and free any external resources or caches associated with it. This method must be implemented by variants that access external resources such disk or DBMSs.
This being a cleanup method, implementations should try not to throw any exceptions here. It should also be possible to call this method repeatedly on the same instance without failure.
close
in interface ClauseStore
public ClauseInfo fetch()
ClauseStore
Get the next clause compatible with the current goal. As a side-effect, all variables local to the clause store should be freed and available for unification again.
fetch
in interface ClauseStore
public boolean hasCompatibleClause()
ClauseStore
Return true
if there are more clauses compatible with the current
goal, irrespective of local variable bindings.
hasCompatibleClause
in interface ClauseStore
public boolean haveAlternatives()
ClauseStore
Return true
if there are more clauses available compatible with
the current goal and false
otherwise. A first call to this
method is equivalent to a call to hasCompatibleClause
(since
no variables would have been bound as yet).
haveAlternatives
in interface ClauseStore
Copyright © 2015. All rights reserved.