Skip to content

Commit 5c8ac54

Browse files
committed
Added getAllPossibleResponses method
1 parent b14b714 commit 5c8ac54

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/com/darkprograms/speech/recognizer/GoogleResponse.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
/**
77
* Class that holds the response and confidence of a Google recognizer request
88
*
9-
* @author Luke Kuza, Duncan Jauncey
9+
* @author Luke Kuza, Duncan Jauncey, Aaron Gokaslan
1010
*/
1111
public class GoogleResponse {
1212

@@ -70,10 +70,20 @@ protected void setConfidence(String confidence) {
7070

7171
/**
7272
* Get other possible responses for this request.
73-
* @return
73+
* @return other possible responses
7474
*/
7575
public List<String> getOtherPossibleResponses() {
7676
return otherPossibleResponses;
7777
}
78+
79+
/**
80+
* Gets all returned responses for this request
81+
* @return All returned responses
82+
*/
83+
public List<String> getAllPossibleResponses() {
84+
List<String> tmp = otherPossibleResponses;
85+
tmp.add(0,response);
86+
return tmp;
87+
}
7888

7989
}

0 commit comments

Comments
 (0)