//
// $Id$
//
// samskivert library - useful routines for java programs
// Copyright (C) 2001-2007 Michael Bayne
//
// This library is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

package com.samskivert.util;

/**
 * The pessimist's dream.  This ResultListener silently eats requestCompleted but makes subclasses
 * handle requestFailed.
 */
public abstract class FailureListener<T>
    implements ResultListener<T>
{
    // documentation inherited from interface ResultListener
    public void requestCompleted (T result)
    {
        // Yeah, yeah, yeah. You did something. Good for you.
    }
}

@@ -1092,32 +1092,8 @@
   //
- documentation inherited
  fro
@@ -1130,16 +1130,22 @@
  public 
+final 
 void req
@@ -1242,11 +1242,384 @@
 u.%0A    %7D
+%0A%0A    /**%0A     * Recasts us to look like we're of a different type. We can safely do this because we know%0A     * that requestCompleted never actually looks at the value passed in.%0A     */%0A    public %3CV%3E FailureListener%3CV%3E retype (Class%3CV%3E klass)%0A    %7B%0A        @SuppressWarnings(%22unchecked%22) FailureListener%3CV%3E casted = (FailureListener%3CV%3E)this;%0A        return casted;%0A    %7D
 %0A%7D%0A

Patch from Dave to make requestCompleted() final and to add a retype() method.