public class AnswerGroup
extends java.lang.Object
implements java.io.Serializable
getId()
.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
Constructor and Description |
---|
AnswerGroup() |
Modifier and Type | Method and Description |
---|---|
void |
addResult(Result pResult)
Adds the result to this answer group
|
int |
getId()
Returns the answer group id, a 1-based identifier.
|
Result |
getResult()
Returns the first result in the group.
|
java.util.List<Result> |
getResults()
These are the results.
|
static java.util.List<AnswerGroup> |
group(java.util.List<Result> pResults)
Utility method that groups a flat list of Results into a list of AnswerGroups.
|
boolean |
isEmpty()
Indicates whether the group has any results
|
void |
setId(int pId)
Sets the answer group id, a 1-based identifier.
|
void |
setResults(java.util.List<Result> pResults)
Sets the results for this answer group
|
public int getId()
public void setId(int pId)
pId
- the answer group id, a 1-based identifier.public Result getResult()
public java.util.List<Result> getResults()
Result
s. See getResult()
if you want the first result (or when you are not grouping by property and can therefore be certain there is only
one result).Result
s.public void setResults(java.util.List<Result> pResults)
pResults
- the results for the grouppublic void addResult(Result pResult)
pResult
- the result to addpublic boolean isEmpty()
public static java.util.List<AnswerGroup> group(java.util.List<Result> pResults)
pResults
- flat list of results