public final class CorrectionInfo extends Object implements Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<CorrectionInfo> |
CREATOR
Used to make this class parcelable.
|
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
CorrectionInfo(int offset,
CharSequence oldText,
CharSequence newText) |
Modifier and Type | Method and Description |
---|---|
int |
describeContents()
Describe the kinds of special objects contained in this Parcelable's
marshalled representation.
|
CharSequence |
getNewText()
Return the new text that corrects what was typed by the user.
|
int |
getOffset()
Return the offset position of this correction in the text.
|
CharSequence |
getOldText()
Return the text that has actually been typed by the user, and which has been corrected.
|
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<CorrectionInfo> CREATOR
public CorrectionInfo(int offset, CharSequence oldText, CharSequence newText)
offset
- The offset in the edited text where the old and new text start.oldText
- The old text that has been replaced.newText
- The replacement text.public int getOffset()
getOldText()
and
getNewText()
start at this offset.public CharSequence getOldText()
public CharSequence getNewText()
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