// Path: library/src/main/java/com/siu/android/volleyball/BallResponse.java
// public class BallResponse<T> {
// 
//     public static enum ResponseSource {
//         LOCAL, CACHE, NETWORK
//     }
// 
//     protected Response<T> mResponse;
//     protected ResponseSource mResponseSource;
//     protected boolean mIdentical = false;
// 
//     /**
//      * Returns whether this response is considered successful.
//      */
//     public boolean isSuccess() {
//         return mResponse.isSuccess();
//     }
// 
//     public static <T> BallResponse<T> identical(ResponseSource responseSource) {
//         return new BallResponse<T>(Response.<T>success(null, null), responseSource, true);
//     }
// 
//     public static <T> BallResponse<T> success(T result) {
//         return new BallResponse<T>(Response.success(result, null));
//     }
// 
//     public static <T> BallResponse<T> success(T result, Cache.Entry cacheEntry) {
//         return new BallResponse<T>(Response.success(result, cacheEntry));
//     }
// 
//     public static <T> BallResponse<T> error(VolleyError error) {
//         return new BallResponse<T>(Response.<T>error(error), ResponseSource.NETWORK); // error cames always from network
//     }
// 
//     protected BallResponse(Response<T> response) {
//         this(response, null, false);
//     }
// 
//     protected BallResponse(Response<T> response, ResponseSource responseSource) {
//         this(response, responseSource, false);
//     }
// 
//     public BallResponse(Response<T> response, ResponseSource responseSource, boolean identical) {
//         mResponse = response;
//         mResponseSource = responseSource;
//         mIdentical = identical;
//     }
// 
//     public ResponseSource getResponseSource() {
//         return mResponseSource;
//     }
// 
//     public void setResponseSource(ResponseSource responseSource) {
//         this.mResponseSource = responseSource;
//     }
// 
//     public boolean isIntermediate() {
//         return mResponse.intermediate;
//     }
// 
//     public void setIntermediate(boolean intermediate) {
//         mResponse.intermediate = intermediate;
//     }
// 
//     public T getResult() {
//         return mResponse.result;
//     }
// 
//     public Cache.Entry getCacheEntry() {
//         return mResponse.cacheEntry;
//     }
// 
//     public VolleyError getError() {
//         return mResponse.error;
//     }
// 
//     public boolean isIdentical() {
//         return mIdentical;
//     }
// 
//     public void setIdentical(boolean identical) {
//         mIdentical = identical;
//     }
// }
// 
// Path: library/src/main/java/com/siu/android/volleyball/exception/BallException.java
// public class BallException extends RuntimeException {
// 
//     public BallException() {
//     }
// 
//     public BallException(String detailMessage) {
//         super(detailMessage);
//     }
// 
//     public BallException(String detailMessage, Object... args) {
//         super(String.format(detailMessage, args));
//     }
// 
// 
// 
//     public BallException(String detailMessage, Throwable throwable) {
//         super(detailMessage, throwable);
//     }
// 
//     public BallException(Throwable throwable) {
//         super(throwable);
//     }
// }


import com.siu.android.volleyball.BallResponse;
import com.siu.android.volleyball.exception.BallException;
package com.siu.android.volleyball.response;


/**
 * Created by lukas on 8/31/13.
 */
public abstract class SingleResponseListener<T> implements ResponseListener<T> {

    /**
     * Can happen when the response is soft cached
     *
     * @param response
     * @param responseSource
     */
    @Override
// Path: library/src/main/java/com/siu/android/volleyball/BallResponse.java
// public class BallResponse<T> {
// 
//     public static enum ResponseSource {
//         LOCAL, CACHE, NETWORK
//     }
// 
//     protected Response<T> mResponse;
//     protected ResponseSource mResponseSource;
//     protected boolean mIdentical = false;
// 
//     /**
//      * Returns whether this response is considered successful.
//      */
//     public boolean isSuccess() {
//         return mResponse.isSuccess();
//     }
// 
//     public static <T> BallResponse<T> identical(ResponseSource responseSource) {
//         return new BallResponse<T>(Response.<T>success(null, null), responseSource, true);
//     }
// 
//     public static <T> BallResponse<T> success(T result) {
//         return new BallResponse<T>(Response.success(result, null));
//     }
// 
//     public static <T> BallResponse<T> success(T result, Cache.Entry cacheEntry) {
//         return new BallResponse<T>(Response.success(result, cacheEntry));
//     }
// 
//     public static <T> BallResponse<T> error(VolleyError error) {
//         return new BallResponse<T>(Response.<T>error(error), ResponseSource.NETWORK); // error cames always from network
//     }
// 
//     protected BallResponse(Response<T> response) {
//         this(response, null, false);
//     }
// 
//     protected BallResponse(Response<T> response, ResponseSource responseSource) {
//         this(response, responseSource, false);
//     }
// 
//     public BallResponse(Response<T> response, ResponseSource responseSource, boolean identical) {
//         mResponse = response;
//         mResponseSource = responseSource;
//         mIdentical = identical;
//     }
// 
//     public ResponseSource getResponseSource() {
//         return mResponseSource;
//     }
// 
//     public void setResponseSource(ResponseSource responseSource) {
//         this.mResponseSource = responseSource;
//     }
// 
//     public boolean isIntermediate() {
//         return mResponse.intermediate;
//     }
// 
//     public void setIntermediate(boolean intermediate) {
//         mResponse.intermediate = intermediate;
//     }
// 
//     public T getResult() {
//         return mResponse.result;
//     }
// 
//     public Cache.Entry getCacheEntry() {
//         return mResponse.cacheEntry;
//     }
// 
//     public VolleyError getError() {
//         return mResponse.error;
//     }
// 
//     public boolean isIdentical() {
//         return mIdentical;
//     }
// 
//     public void setIdentical(boolean identical) {
//         mIdentical = identical;
//     }
// }
// 
// Path: library/src/main/java/com/siu/android/volleyball/exception/BallException.java
// public class BallException extends RuntimeException {
// 
//     public BallException() {
//     }
// 
//     public BallException(String detailMessage) {
//         super(detailMessage);
//     }
// 
//     public BallException(String detailMessage, Object... args) {
//         super(String.format(detailMessage, args));
//     }
// 
// 
// 
//     public BallException(String detailMessage, Throwable throwable) {
//         super(detailMessage, throwable);
//     }
// 
//     public BallException(Throwable throwable) {
//         super(throwable);
//     }
// }


// Path: library/src/main/java/com/siu/android/volleyball/response/SingleResponseListener.java
import com.siu.android.volleyball.BallResponse;
import com.siu.android.volleyball.exception.BallException;

package com.siu.android.volleyball.response;


/**
 * Created by lukas on 8/31/13.
 */
public abstract class SingleResponseListener<T> implements ResponseListener<T> {

    /**
     * Can happen when the response is soft cached
     *
     * @param response
     * @param responseSource
     */
    @Override
    public final void onIntermediateResponse(T response, BallResponse.ResponseSource responseSource) {