public class RDBMSResultList extends Object implements ResultList
Constructor and Description |
---|
RDBMSResultList(int arity) |
Modifier and Type | Method and Description |
---|---|
void |
addResult(Constant[] res) |
void |
close()
Close the associated iterator and any open queries.
|
Constant[] |
get(int index)
Returns a substitution for all
Variables . |
Constant |
get(int index,
Variable var)
Returns a substitution for a single
Variable |
int |
getArity() |
int |
getPos(Variable var) |
Map<Variable,Integer> |
getVariableMap()
Get the mapping between variables and their index in the results.
|
Iterator<Constant[]> |
iterator() |
void |
setVariable(Variable var,
int pos) |
int |
size() |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public void addResult(Constant[] res)
public void setVariable(Variable var, int pos)
public Map<Variable,Integer> getVariableMap()
QueryResultIterable
getVariableMap
in interface QueryResultIterable
public int getPos(Variable var)
public Constant get(int index, Variable var)
ResultList
Variable
get
in interface ResultList
index
- the index of the substitution (from 0 to size-1)var
- the Variable that is replacedpublic Constant[] get(int index)
ResultList
Variables
.
GroundTerms are ordered according to the Variables' first appearances in a depth-first, left-to-right traversal of the Formula in the DatabaseQuery that generated this ResultList.
get
in interface ResultList
index
- the index of the substitution (from 0 to size-1)public int getArity()
getArity
in interface ResultList
Variables
replaced in
each substitutionpublic int size()
size
in interface ResultList
public void close()
QueryResultIterable
close
in interface QueryResultIterable
Copyright © 2020 University of California, Santa Cruz. All rights reserved.