public final class SentenceSuggestionsInfo
extends Object implements Parcelable
| java.lang.Object | |
| android.view.textservice.SentenceSuggestionsInfo | |
该类包含从文本服务返回的建议的元数据(例如SpellCheckerService )。 文本服务使用这个类来返回一个句子的建议。 请参阅SuggestionsInfo用于提供单词的建议。 这个类扩展了SuggestionsInfo的功能,只要这个类允许你将多个SuggestionsInfo放在一个带有偏移量和所有SuggestionsInfo的长度的SuggestionsInfo 。
Inherited constants |
|---|
android.os.Parcelable
|
Fields |
|
|---|---|
public static final Creator<SentenceSuggestionsInfo> |
CREATOR 用于使这个类可以分类。 |
Public constructors |
|
|---|---|
SentenceSuggestionsInfo(SuggestionsInfo[] suggestionsInfos, int[] offsets, int[] lengths) 构造函数。 |
|
SentenceSuggestionsInfo(Parcel source) |
|
公共方法(Public methods) |
|
|---|---|
int |
describeContents() 描述此Parcelable实例的封送表示中包含的特殊对象的种类。 |
int |
getLengthAt(int i) |
int |
getOffsetAt(int i) |
int |
getSuggestionsCount() |
SuggestionsInfo |
getSuggestionsInfoAt(int i) |
void |
writeToParcel(Parcel dest, int flags) 用于将此对象打包成 |
继承方法(Inherited methods) |
|
|---|---|
java.lang.Object
|
|
android.os.Parcelable
|
|
SentenceSuggestionsInfo (SuggestionsInfo[] suggestionsInfos, int[] offsets, int[] lengths)
构造函数。
| 参数(Parameters) | |
|---|---|
suggestionsInfos |
SuggestionsInfo: from the text service |
offsets |
int: the array of offsets of suggestions |
lengths |
int: the array of lengths of suggestions |
SentenceSuggestionsInfo (Parcel source)
| 参数(Parameters) | |
|---|---|
source |
Parcel
|
int describeContents ()
描述此Parcelable实例的封送表示中包含的特殊对象的种类。 例如,如果对象在writeToParcel(Parcel, int)的输出中包含writeToParcel(Parcel, int) ,则此方法的返回值必须包含CONTENTS_FILE_DESCRIPTOR位。
| 返回(Returns) | |
|---|---|
int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. |
int getLengthAt (int i)
| 参数(Parameters) | |
|---|---|
i |
int: the id of SuggestionsInfos this instance holds |
| 返回(Returns) | |
|---|---|
int |
the length of the specified SuggestionsInfo |
int getOffsetAt (int i)
| 参数(Parameters) | |
|---|---|
i |
int: the id of SuggestionsInfos this instance holds |
| 返回(Returns) | |
|---|---|
int |
the offset of the specified SuggestionsInfo |
int getSuggestionsCount ()
| 返回(Returns) | |
|---|---|
int |
the count of SuggestionsInfos this instance holds. |
SuggestionsInfo getSuggestionsInfoAt (int i)
| 参数(Parameters) | |
|---|---|
i |
int: the id of SuggestionsInfos this instance holds. |
| 返回(Returns) | |
|---|---|
SuggestionsInfo |
a SuggestionsInfo at the specified id |
void writeToParcel (Parcel dest, int flags)
用于将此对象打包成 Parcel 。
| 参数(Parameters) | |
|---|---|
dest |
Parcel: The Parcel to be written. |
flags |
int: The flags used for parceling. |