Added ResultListener.NOOP which can be used like so:
foo.doSomeThing(bar, new ResultListener.NOOP<MyType>()); git-svn-id: https://samskivert.googlecode.com/svn/trunk@1836 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -36,6 +36,15 @@ package com.samskivert.util;
|
||||
*/
|
||||
public interface ResultListener<T>
|
||||
{
|
||||
/** A result listener that does nothing for cases where that is an
|
||||
* appropriate behavior. */
|
||||
public static class NOOP<T> implements ResultListener<T> {
|
||||
public void requestCompleted (T result) {
|
||||
}
|
||||
public void requestFailed (Exception cause) {
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Called to communicate that the request succeeded and that the
|
||||
* result is available.
|
||||
|
||||
Reference in New Issue
Block a user