public class QueryResult extends Object
KBase
object of an agent. Such a result can be :
- null
if the queried fact is not believed by the agent,
- Modifier and Type | Class and Description |
---|---|
static class |
QueryResult.BoolWrapper |
Modifier and Type | Field and Description |
---|---|
static QueryResult |
KNOWN |
private ArrayList |
results |
static QueryResult |
UNKNOWN |
Constructor and Description |
---|
QueryResult()
Constructor.
|
QueryResult(ArrayList results)
Constructor.
|
QueryResult(MatchResult result)
Constructor.
|
QueryResult(QueryResult queryResult)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
add(MatchResult result)
This method add a given result if not already in the results list.
|
void |
addAll(ArrayList results)
This method add all the results if not already in the results list.
|
static ArrayList |
addReasons(ArrayList reasons,
ArrayList list) |
boolean |
equals(Object qr) |
MatchResult |
getResult(int index) |
ArrayList |
getResults() |
boolean |
isEmpty() |
MatchResult |
remove(int i) |
void |
remove(MatchResult result)
This method remove a given result from the results list.
|
(package private) void |
removeSubsumedMatchResult() |
int |
size() |
String |
toString() |
QueryResult |
union(QueryResult other)
Returns the union between this list of match results and the other one given as an argument
|
public static final QueryResult UNKNOWN
public static final QueryResult KNOWN
private ArrayList results
public QueryResult()
public QueryResult(MatchResult result)
public QueryResult(ArrayList results)
public QueryResult(QueryResult queryResult)
public ArrayList getResults()
public MatchResult getResult(int index)
public void add(MatchResult result)
result
- The MatchResult to add.public void addAll(ArrayList results)
results
- The MatchResults to add.public void remove(MatchResult result)
result
- The MatchResult to remove.public MatchResult remove(int i)
public int size()
public boolean isEmpty()
public QueryResult union(QueryResult other)
other
- void removeSubsumedMatchResult()