public class Recommendation extends Object
Each Recommendation instance represents a group.
The group search result contains the following parameters:
field, value (field value), count
(number of indexes in the group), and indexDataList
(index data in the group, which is not returned by default).
SystemCapability.Data#DATA_SEARCH| 构造器 | 说明 |
|---|---|
Recommendation(String field,
String value,
List<IndexData> indexDataList,
long count) |
A constructor used to create a
Recommendation instance. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
long |
getCount() |
Obtains the number of indexes in this group.
|
String |
getField() |
Obtains the field of this group.
|
List<IndexData> |
getIndexDataList() |
Obtains the index data in this group.
|
String |
getValue() |
Obtains the field value of this group.
|
void |
setCount(long count) |
Sets the number of indexes in this group.
|
void |
setField(String field) |
Sets the field for this group.
|
void |
setIndexDataList(List<IndexData> indexDataList) |
Sets the index data in this group.
|
void |
setValue(String value) |
Sets the field value for this group.
|
String |
toString() |
Returns a string representation of the object.
|
public Recommendation(String field, String value, List<IndexData> indexDataList, long count)
Recommendation instance.field - Indicates the field of the group.value - Indicates the field value of the group.count - Indicates the number of indexes in the group.indexDataList - Indicates the index data in the group.public void setField(String field)
field - Indicates the field to set.public void setValue(String value)
value - Indicates the field value to set.public void setIndexDataList(List<IndexData> indexDataList)
indexDataList - Indicates the index data to set.public void setCount(long count)
count - Indicates the number of indexes to set.public String getField()
public String getValue()
public List<IndexData> getIndexDataList()
public long getCount()
public String toString()
ObjecttoString method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())