public class RDBMSResultList extends Object implements ResultList
Constructor and Description |
---|
RDBMSResultList(int arity) |
Modifier and Type | Method and Description |
---|---|
void |
addResult(Constant[] res) |
Constant[] |
get(int resultNo)
Returns a substitution for all
Variables . |
Constant |
get(int resultNo,
Variable var)
Returns a substitution for a single
Variable |
int |
getArity() |
int |
getPos(Variable var) |
Map<Variable,Integer> |
getVariableMap()
Returns a Map from
Variables to the indices of
substitutions that are returned by ResultList.get(int) . |
void |
setVariable(Variable var,
int pos) |
int |
size() |
String |
toString() |
public void addResult(Constant[] res)
public void setVariable(Variable var, int pos)
public Map<Variable,Integer> getVariableMap()
ResultList
Variables
to the indices of
substitutions that are returned by ResultList.get(int)
.getVariableMap
in interface ResultList
public int getPos(Variable var)
public Constant get(int resultNo, Variable var)
ResultList
Variable
get
in interface ResultList
resultNo
- the index of the substitution (from 0 to size-1)var
- the Variable that is replacedpublic Constant[] get(int resultNo)
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
resultNo
- 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
Copyright © 2018 University of California, Santa Cruz. All rights reserved.