Added a peekResult method to ResultHandler.

git-svn-id: https://samskivert.googlecode.com/svn/trunk@2078 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
andrzej
2007-03-29 19:04:20 +00:00
parent 138f38c502
commit 39cd3f3341
@@ -27,6 +27,16 @@ public class ResultHandler<T>
}
}
/**
* Peeks at the result, which will be returned if already available. If the result is pending
* or there was an error, this method returns <code>null</code> (which, however, will also be
* returned if the actual result was <code>null</code>).
*/
public T peekResult ()
{
return (_error == null && _list == null) ? _result : null;
}
// documentation inherited from interface ResultListener
public void requestCompleted (T result)
{