aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/java/com/android/volley/RequestTask.java
blob: b429f79102838762edb3d233e3d3c3963ad0bff0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package com.android.volley;

/**
 * Abstract runnable that's a task to be completed by the RequestQueue.
 *
 * <p><b>WARNING</b>: This API is experimental and subject to breaking changes. Please see
 * https://github.com/google/volley/wiki/Asynchronous-Volley for more details.
 */
public abstract class RequestTask<T> implements Runnable {
    final Request<T> mRequest;

    public RequestTask(Request<T> request) {
        mRequest = request;
    }

    @SuppressWarnings("unchecked")
    public int compareTo(RequestTask<?> other) {
        return mRequest.compareTo((Request<T>) other.mRequest);
    }
}