Android APIs
public final class

SentenceSuggestionsInfo

extends Object
implements Parcelable
java.lang.Object
   ↳ android.view.textservice.SentenceSuggestionsInfo

Class Overview

This class contains a metadata of suggestions returned from a text service (e.g. SpellCheckerService). The text service uses this class to return the suggestions for a sentence. See SuggestionsInfo which is used for suggestions for a word. This class extends the functionality of SuggestionsInfo as far as this class enables you to put multiple SuggestionsInfos on a sentence with the offsets and the lengths of all SuggestionsInfos.

Summary

[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<SentenceSuggestionsInfo> CREATOR Used to make this class parcelable.
Public Constructors
SentenceSuggestionsInfo(SuggestionsInfo[] suggestionsInfos, int[] offsets, int[] lengths)
Constructor.
SentenceSuggestionsInfo(Parcel source)
Public Methods
int describeContents()
Describe the kinds of special objects contained in this Parcelable's marshalled representation.
int getLengthAt(int i)
int getOffsetAt(int i)
int getSuggestionsCount()
SuggestionsInfo getSuggestionsInfoAt(int i)
void writeToParcel(Parcel dest, int flags)
Used to package this object into a Parcel.
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Fields

public static final Creator<SentenceSuggestionsInfo> CREATOR

Added in API level 16

Used to make this class parcelable.

Public Constructors

public SentenceSuggestionsInfo (SuggestionsInfo[] suggestionsInfos, int[] offsets, int[] lengths)

Added in API level 16

Constructor.

Parameters
suggestionsInfos SuggestionsInfo: from the text service
offsets int: the array of offsets of suggestions
lengths int: the array of lengths of suggestions

public SentenceSuggestionsInfo (Parcel source)

Added in API level 16

Parameters
source Parcel

Public Methods

public int describeContents ()

Added in API level 16

Describe the kinds of special objects contained in this Parcelable's marshalled representation.

Returns
int a bitmask indicating the set of special object types marshalled by the Parcelable.

public int getLengthAt (int i)

Added in API level 16

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

public int getOffsetAt (int i)

Added in API level 16

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

public int getSuggestionsCount ()

Added in API level 16

Returns
int the count of SuggestionsInfos this instance holds.

public SuggestionsInfo getSuggestionsInfoAt (int i)

Added in API level 16

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

public void writeToParcel (Parcel dest, int flags)

Added in API level 16

Used to package this object into a Parcel.

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