public final class SentenceSuggestionsInfo
extends Object
implements Parcelable
java.lang.Object | |
↳ | android.view.textservice.SentenceSuggestionsInfo |
该类包含从文本服务返回的建议的元数据(例如SpellCheckerService
)。 文本服务使用这个类来返回一个句子的建议。 请参阅SuggestionsInfo
用于提供单词的建议。 这个类扩展了SuggestionsInfo
的功能,只要这个类允许你将多个SuggestionsInfo
放在一个带有偏移量和所有SuggestionsInfo
的长度的SuggestionsInfo
。
Inherited constants |
---|
From interface 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 |
|
---|---|
From class java.lang.Object
|
|
From interface 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 SuggestionsInfo s this instance holds |
Returns | |
---|---|
int |
the length of the specified SuggestionsInfo |
int getOffsetAt (int i)
Parameters | |
---|---|
i |
int : the id of SuggestionsInfo s this instance holds |
Returns | |
---|---|
int |
the offset of the specified SuggestionsInfo |
int getSuggestionsCount ()
Returns | |
---|---|
int |
the count of SuggestionsInfo s this instance holds. |
SuggestionsInfo getSuggestionsInfoAt (int i)
Parameters | |
---|---|
i |
int : the id of SuggestionsInfo s 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. |