Most visited

Recently visited

Added in API level 16

SentenceSuggestionsInfo

public final class SentenceSuggestionsInfo
extends Object implements Parcelable

java.lang.Object
   ↳ android.view.textservice.SentenceSuggestionsInfo


该类包含从文本服务返回的建议的元数据(例如SpellCheckerService )。 文本服务使用这个类来返回一个句子的建议。 请参阅SuggestionsInfo用于提供单词的建议。 这个类扩展了SuggestionsInfo的功能,只要这个类允许你将多个SuggestionsInfo放在一个带有偏移量和所有SuggestionsInfo的长度的SuggestionsInfo

Summary

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)

用于将此对象打包成 Parcel

Inherited methods

From class java.lang.Object
From interface android.os.Parcelable

Fields

CREATOR

Added in API level 16
Creator<SentenceSuggestionsInfo> CREATOR

用于使这个类可以分类。

Public constructors

SentenceSuggestionsInfo

Added in API level 16
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

Added in API level 16
SentenceSuggestionsInfo (Parcel source)

Parameters
source Parcel

Public methods

describeContents

Added in API level 16
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.

getLengthAt

Added in API level 16
int getLengthAt (int i)

Parameters
i int: the id of SuggestionsInfos this instance holds
Returns
int the length of the specified SuggestionsInfo

getOffsetAt

Added in API level 16
int getOffsetAt (int i)

Parameters
i int: the id of SuggestionsInfos this instance holds
Returns
int the offset of the specified SuggestionsInfo

getSuggestionsCount

Added in API level 16
int getSuggestionsCount ()

Returns
int the count of SuggestionsInfos this instance holds.

getSuggestionsInfoAt

Added in API level 16
SuggestionsInfo getSuggestionsInfoAt (int i)

Parameters
i int: the id of SuggestionsInfos this instance holds.
Returns
SuggestionsInfo a SuggestionsInfo at the specified id

writeToParcel

Added in API level 16
void writeToParcel (Parcel dest, 
                int flags)

用于将此对象打包成 Parcel

Parameters
dest Parcel: The Parcel to be written.
flags int: The flags used for parceling.

Hooray!