mobi.voiceassistant.base.content
Class Utterance

java.lang.Object
  extended by mobi.voiceassistant.base.content.Utterance
All Implemented Interfaces:
Parcelable

public final class Utterance
extends Object
implements Parcelable

This class is used to couple speech with other content like RemoteViews. To couple speech with CharSequence it's better to use SpeechTextUtils factory

See Also:
SpeechTextUtils, Response.setContent(Object)

Nested Class Summary
 
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
 
Field Summary
static Parcelable.Creator<Utterance> CREATOR
           
 
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
 
Constructor Summary
Utterance(Object content, CharSequence speech)
          Base constructor.
 
Method Summary
 int describeContents()
           
<T> T
getContent()
           
 CharSequence getSpeech()
           
 void writeToParcel(Parcel parcel, int flags)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CREATOR

public static final Parcelable.Creator<Utterance> CREATOR
Constructor Detail

Utterance

public Utterance(Object content,
                 CharSequence speech)
Base constructor.

Parameters:
content - The content
speech - The speech
Method Detail

getContent

public <T> T getContent()
Returns:
Content that was passed to constructor
See Also:
Response.getContent()

getSpeech

public CharSequence getSpeech()
Returns:
Speech that was passed to constructor

describeContents

public int describeContents()
Specified by:
describeContents in interface Parcelable

writeToParcel

public void writeToParcel(Parcel parcel,
                          int flags)
Specified by:
writeToParcel in interface Parcelable