Class Overview
This class contains a metadata of suggestions from the text service
Summary
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this Object .
|
boolean
|
equals(Object o)
Compares this instance with the specified object and indicates if they
are equal.
|
void
|
finalize()
Invoked when the garbage collector has detected that this instance is no longer reachable.
|
final
Class<?>
|
getClass()
Returns the unique instance of Class that represents this
object's class.
|
int
|
hashCode()
Returns an integer hash code for this object.
|
final
void
|
notify()
Causes a thread which is waiting on this object's monitor (by means of
calling one of the wait() methods) to be woken up.
|
final
void
|
notifyAll()
Causes all threads which are waiting on this object's monitor (by means
of calling one of the wait() methods) to be woken up.
|
String
|
toString()
Returns a string containing a concise, human-readable description of this
object.
|
final
void
|
wait()
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.
|
final
void
|
wait(long millis, int nanos)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
final
void
|
wait(long millis)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
|
From interface
android.os.Parcelable
abstract
int
|
describeContents()
Describe the kinds of special objects contained in this Parcelable's
marshalled representation.
|
abstract
void
|
writeToParcel(Parcel dest, int flags)
Flatten this object in to a Parcel.
|
|
Constants
public
static
final
int
RESULT_ATTR_IN_THE_DICTIONARY
Flag of the attributes of the suggestions that can be obtained by
getSuggestionsAttributes()
: this tells that the requested word was found
in the dictionary in the text service.
Constant Value:
1
(0x00000001)
public
static
final
int
RESULT_ATTR_LOOKS_LIKE_TYPO
Flag of the attributes of the suggestions that can be obtained by
getSuggestionsAttributes()
: this tells that the text service thinks the requested
word looks like a typo.
Constant Value:
2
(0x00000002)
Fields
Used to make this class parcelable.
Public Constructors
public
SuggestionsInfo
(int suggestionsAttributes, String[] suggestions)
Parameters
suggestionsAttributes
| from the text service |
suggestions
| from the text service
|
public
SuggestionsInfo
(int suggestionsAttributes, String[] suggestions, int cookie, int sequence)
Parameters
suggestionsAttributes
| from the text service |
suggestions
| from the text service |
cookie
| the cookie of the input TextInfo |
sequence
| the cookie of the input TextInfo
|
public
SuggestionsInfo
(Parcel source)
Public Methods
public
int
describeContents
()
Used to make this class parcelable.
Returns
- a bitmask indicating the set of special object types marshalled
by the Parcelable.
public
int
getCookie
()
Returns
- the cookie which may be set by a client application
public
int
getSequence
()
Returns
- the sequence which may be set by a client application
public
String
getSuggestionAt
(int i)
Returns
- the suggestion at the specified id
public
int
getSuggestionsAttributes
()
Returns
- the attributes of suggestions. This includes whether the spell checker has the word
in its dictionary or not and whether the spell checker has confident suggestions for the
word or not.
public
int
getSuggestionsCount
()
Returns
- the count of the suggestions. If there's no suggestions at all, this method returns
-1. Even if this method returns 0, it doesn't necessarily mean that there are no suggestions
for the requested word. For instance, the caller could have been asked to limit the maximum
number of suggestions returned.
public
void
setCookieAndSequence
(int cookie, int sequence)
Set the cookie and the sequence of SuggestionsInfo which are set to TextInfo from a client
application
Parameters
cookie
| the cookie of an input TextInfo |
sequence
| the cookie of an input TextInfo
|
public
void
writeToParcel
(Parcel dest, int flags)
Used to package this object into a Parcel
.
Parameters
dest
| The Parcel to be written. |
flags
| The flags used for parceling.
|