|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.isi.stella.Stella_Object
edu.isi.stella.StandardObject
edu.isi.stella.AbstractCollection
edu.isi.stella.AbstractDictionary
edu.isi.stella.Dictionary
edu.isi.powerloom.logic.QuerySolutionTable
public class QuerySolutionTable
Special key/value map for query solutions indexed by output variable binding vectors that also preserves the order of solution generation.
| Field Summary | |
|---|---|
QuerySolution |
first
|
QuerySolution |
last
|
QueryIterator |
query
|
KeyValueMap |
theMap
|
| Constructor Summary | |
|---|---|
QuerySolutionTable()
|
|
| Method Summary | |
|---|---|
static Stella_Object |
accessQuerySolutionTableSlotValue(QuerySolutionTable self,
Symbol slotname,
Stella_Object value,
boolean setvalueP)
|
AbstractIterator |
allocateIterator()
|
void |
clear()
|
Cons |
consify()
Collect all solutions of self into a cons list and return the result. |
boolean |
emptyP()
Return TRUE if self has zero entries. |
void |
insertAt(Vector key,
QuerySolution value)
Insert value identified by key into self. |
int |
length()
Return the number of entries in self. |
Stella_Object |
lookup(Vector key)
Lookup the solution identified by key in self and
return its value, or NULL if no such solution exists. |
static QuerySolutionTable |
newQuerySolutionTable()
|
boolean |
nonEmptyP()
Return TRUE if self has at least 1 entry. |
QuerySolution |
nth(int position)
Return the nth solution in self, or NULL if it is empty. |
QuerySolution |
pop()
Remove and return the first solution of self or NULL
if the table is empty. |
Surrogate |
primaryType()
Returns the primary type of self. |
void |
removeAt(Vector key)
Remove the solution identified by key from self. |
QuerySolutionTable |
sort(java.lang.reflect.Method predicate)
Perform a stable, destructive sort of self according to
predicate, and return the result. |
| Methods inherited from class edu.isi.stella.Dictionary |
|---|
insertAt, lookup |
| Methods inherited from class edu.isi.stella.AbstractDictionary |
|---|
dictionary |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public KeyValueMap theMap
public QueryIterator query
public QuerySolution first
public QuerySolution last
| Constructor Detail |
|---|
public QuerySolutionTable()
| Method Detail |
|---|
public static QuerySolutionTable newQuerySolutionTable()
public AbstractIterator allocateIterator()
allocateIterator in class Dictionarypublic QuerySolutionTable sort(java.lang.reflect.Method predicate)
self according to
predicate, and return the result. If predicate has a '<' semantics, the
result will be in ascending order.
predicate -
public Cons consify()
self into a cons list and return the result.
consify in class Stella_Objectpublic void clear()
public QuerySolution nth(int position)
self, or NULL if it is empty.
position -
public boolean nonEmptyP()
self has at least 1 entry.
public boolean emptyP()
self has zero entries.
public int length()
self.
length in class AbstractCollectionpublic QuerySolution pop()
self or NULL
if the table is empty.
public void removeAt(Vector key)
key from self.
To preserve the solution ordering chain, the solution is marked as deleted
and will be completely removed upon the next iteration through self.
key -
public void insertAt(Vector key,
QuerySolution value)
value identified by key into self. If a solution
with that key already exists, destructively modify it with the slot values of
value. This is necessary to preserve the order of solutions in self.
key - value - public Stella_Object lookup(Vector key)
key in self and
return its value, or NULL if no such solution exists.
key -
public static Stella_Object accessQuerySolutionTableSlotValue(QuerySolutionTable self,
Symbol slotname,
Stella_Object value,
boolean setvalueP)
public Surrogate primaryType()
Stella_Objectself.
Gets defined automatically for every non-abstract subclass of OBJECT.
primaryType in class Stella_Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||