public final class CompletionInfo extends Object implements Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<CompletionInfo> |
CREATOR
Used to make this class parcelable.
|
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
CompletionInfo(long id,
int index,
CharSequence text)
Create a simple completion with just text, no label.
|
CompletionInfo(long id,
int index,
CharSequence text,
CharSequence label)
Create a full completion with both text and label.
|
Modifier and Type | Method and Description |
---|---|
int |
describeContents()
Describe the kinds of special objects contained in this Parcelable's
marshalled representation.
|
long |
getId()
Return the abstract identifier for this completion, typically
corresponding to the id associated with it in the original adapter.
|
CharSequence |
getLabel()
Return the user-visible label for the completion, or null if the plain
text should be shown.
|
int |
getPosition()
Return the original position of this completion, typically
corresponding to its position in the original adapter.
|
CharSequence |
getText()
Return the actual text associated with this completion.
|
String |
toString()
Returns a string containing a concise, human-readable description of this
object.
|
void |
writeToParcel(Parcel dest,
int flags)
Used to package this object into a
Parcel . |
public static final Parcelable.Creator<CompletionInfo> CREATOR
public CompletionInfo(long id, int index, CharSequence text)
public CompletionInfo(long id, int index, CharSequence text, CharSequence label)
public long getId()
public int getPosition()
public CharSequence getText()
public CharSequence getLabel()
public String toString()
Object
getClass().getName() + '@' + Integer.toHexString(hashCode())
See Writing a useful
toString
method
if you intend implementing your own toString
method.
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
describeContents
in interface Parcelable