From 2fa3693c264a4c150ac307d9bb7f6f8f18cc4ffc Mon Sep 17 00:00:00 2001 From: Ken Wakasa Date: Fri, 13 Dec 2013 17:09:16 +0900 Subject: Reset to 9bd6dac4708ad94fd0257c53e977df62b152e20c The bulk merge from -bayo to klp-dev should not have been merged to master. Change-Id: I527a03a76f5247e4939a672f27c314dc11cbb854 --- .../android/inputmethod/latin/utils/AsyncResultHolder.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'java/src/com/android/inputmethod/latin/utils/AsyncResultHolder.java') diff --git a/java/src/com/android/inputmethod/latin/utils/AsyncResultHolder.java b/java/src/com/android/inputmethod/latin/utils/AsyncResultHolder.java index c2e97a36f..d12aad639 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 a result of asynchronous computation. + * This class is a holder of the result of an asynchronous computation. * * @param the type of the result. */ @@ -36,9 +36,9 @@ public class AsyncResultHolder { } /** - * Sets the result value to this holder. + * Sets the result value of this holder. * - * @param result the value which is set. + * @param result the value to set. */ public void set(final E result) { synchronized(mLock) { @@ -54,12 +54,12 @@ public class AsyncResultHolder { * 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 time to wait. - * @return if the result is set until the time limit then the result, otherwise defaultValue. + * @param timeOut the maximum time to wait. + * @return if the result is set before 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; -- cgit v1.2.3-83-g751a