aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/utils/AsyncResultHolder.java
diff options
context:
space:
mode:
authorSatoshi Kataoka <satok@google.com>2013-12-13 04:15:33 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2013-12-13 04:15:33 +0000
commit18d033405c18a8dc28f60ca22d1d0df23a679384 (patch)
tree77ae6dc696eb7f2942e6d5bfebdccb95eebf8a6e /java/src/com/android/inputmethod/latin/utils/AsyncResultHolder.java
parent95050f54e92ff5465e713990315e8cf421836a64 (diff)
parentc95efbbd575239b97db20b71fb347b543b5808f8 (diff)
downloadlatinime-18d033405c18a8dc28f60ca22d1d0df23a679384.tar.gz
latinime-18d033405c18a8dc28f60ca22d1d0df23a679384.tar.xz
latinime-18d033405c18a8dc28f60ca22d1d0df23a679384.zip
Merge branch 'master' of https://googleplex-android.googlesource.com/_direct/platform/packages/inputmethods/LatinIME
Diffstat (limited to 'java/src/com/android/inputmethod/latin/utils/AsyncResultHolder.java')
-rw-r--r--java/src/com/android/inputmethod/latin/utils/AsyncResultHolder.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/java/src/com/android/inputmethod/latin/utils/AsyncResultHolder.java b/java/src/com/android/inputmethod/latin/utils/AsyncResultHolder.java
index d12aad639..c2e97a36f 100644
--- a/java/src/com/android/inputmethod/latin/utils/AsyncResultHolder.java
+++ b/java/src/com/android/inputmethod/latin/utils/AsyncResultHolder.java
@@ -20,7 +20,7 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
/**
- * This class is a holder of the result of an asynchronous computation.
+ * This class is a holder of a result of asynchronous computation.
*
* @param <E> the type of the result.
*/
@@ -36,9 +36,9 @@ public class AsyncResultHolder<E> {
}
/**
- * Sets the result value of this holder.
+ * Sets the result value to this holder.
*
- * @param result the value to set.
+ * @param result the value which is set.
*/
public void set(final E result) {
synchronized(mLock) {
@@ -54,12 +54,12 @@ public class AsyncResultHolder<E> {
* Causes the current thread to wait unless the value is set or the specified time is elapsed.
*
* @param defaultValue the default value.
- * @param timeOut the maximum time to wait.
- * @return if the result is set before the time limit then the result, otherwise defaultValue.
+ * @param timeOut the time to wait.
+ * @return if the result is set until the time limit then the result, otherwise defaultValue.
*/
public E get(final E defaultValue, final long timeOut) {
try {
- if (mLatch.await(timeOut, TimeUnit.MILLISECONDS)) {
+ if(mLatch.await(timeOut, TimeUnit.MILLISECONDS)) {
return mResult;
} else {
return defaultValue;