Patch from Dave to make requestCompleted() final and to add a retype() method.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2572 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -27,9 +27,19 @@ package com.samskivert.util;
|
||||
public abstract class FailureListener<T>
|
||||
implements ResultListener<T>
|
||||
{
|
||||
// documentation inherited from interface ResultListener
|
||||
public void requestCompleted (T result)
|
||||
// from interface ResultListener
|
||||
public final void requestCompleted (T result)
|
||||
{
|
||||
// Yeah, yeah, yeah. You did something. Good for you.
|
||||
}
|
||||
|
||||
/**
|
||||
* Recasts us to look like we're of a different type. We can safely do this because we know
|
||||
* that requestCompleted never actually looks at the value passed in.
|
||||
*/
|
||||
public <V> FailureListener<V> retype (Class<V> klass)
|
||||
{
|
||||
@SuppressWarnings("unchecked") FailureListener<V> casted = (FailureListener<V>)this;
|
||||
return casted;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user