public final class SentenceSuggestionsInfo extends Object implements Parcelable
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 SuggestionsInfo
s on a sentence with the offsets and the lengths
of all SuggestionsInfo
s.Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<SentenceSuggestionsInfo> |
CREATOR
Used to make this class parcelable.
|
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_ELIDE_DUPLICATES, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
SentenceSuggestionsInfo(Parcel source) |
SentenceSuggestionsInfo(SuggestionsInfo[] suggestionsInfos,
int[] offsets,
int[] lengths)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
describeContents()
Describe the kinds of special objects contained in this Parcelable
instance's marshaled 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 . |
public static final Parcelable.Creator<SentenceSuggestionsInfo> CREATOR
public SentenceSuggestionsInfo(SuggestionsInfo[] suggestionsInfos, int[] offsets, int[] lengths)
suggestionsInfos
- from the text serviceoffsets
- the array of offsets of suggestionslengths
- the array of lengths of suggestionspublic SentenceSuggestionsInfo(Parcel source)
public void writeToParcel(Parcel dest, int flags)
Parcel
.writeToParcel
in interface Parcelable
dest
- The Parcel
to be written.flags
- The flags used for parceling.public int describeContents()
Parcelable
Parcelable.writeToParcel(Parcel, int)
,
the return value of this method must include the
Parcelable.CONTENTS_FILE_DESCRIPTOR
bit.describeContents
in interface Parcelable
Parcelable.CONTENTS_FILE_DESCRIPTOR
public int getSuggestionsCount()
SuggestionsInfo
s this instance holds.public SuggestionsInfo getSuggestionsInfoAt(int i)
i
- the id of SuggestionsInfo
s this instance holds.SuggestionsInfo
at the specified idpublic int getOffsetAt(int i)
i
- the id of SuggestionsInfo
s this instance holdsSuggestionsInfo
public int getLengthAt(int i)
i
- the id of SuggestionsInfo
s this instance holdsSuggestionsInfo