| Constructor and Description |
|---|
VoiceCommand(List<String> voiceCommands,
VoiceCommandSelectionListener voiceCommandSelectionListener)
Constructor that sets all parameters for this class
NOTE: While it is possible to pass in null for the listener, It is the easiest way to know when it was triggered.
|
| Modifier and Type | Method and Description |
|---|---|
VoiceCommand |
clone()
Creates a deep copy of the object
|
boolean |
equals(Object o)
Uses our custom hashCode for VoiceCommand objects
|
List<String> |
getVoiceCommands()
The strings the user can say to activate this voice command
|
VoiceCommandSelectionListener |
getVoiceCommandSelectionListener()
The listener that will be called when the command is activated
|
int |
hashCode()
Used to compile hashcode for VoiceCommand for use to compare in equals method
|
void |
setVoiceCommands(List<String> voiceCommands)
The strings the user can say to activate this voice command
|
void |
setVoiceCommandSelectionListener(VoiceCommandSelectionListener voiceCommandSelectionListener)
The listener that will be called when the command is activated
|
public VoiceCommand(@NonNull
List<String> voiceCommands,
@Nullable
VoiceCommandSelectionListener voiceCommandSelectionListener)
voiceCommands - The strings the user can say to activate this voice commandvoiceCommandSelectionListener - The listener that will be called when the command is activatedpublic void setVoiceCommands(@NonNull
List<String> voiceCommands)
voiceCommands - - the list of commands to send to the head unitpublic List<String> getVoiceCommands()
public void setVoiceCommandSelectionListener(VoiceCommandSelectionListener voiceCommandSelectionListener)
voiceCommandSelectionListener - - the listener for this objectpublic VoiceCommandSelectionListener getVoiceCommandSelectionListener()
public int hashCode()
public boolean equals(Object o)
public VoiceCommand clone()