package in.srain.cube.image;

/**
 * Created by xufu.lg on 2015/3/30.
 */
public class ImageLoadRequest {

    public String mUrl;

    private int mRequestWidth;
    private int mRequestHeight;
    private int mSpecifiedWidth;
    private int mSpecifiedHeight;
    private int mPriority;
    private ImageReuseInfo mImageReuseInfo;

    public ImageLoadRequest(String url, int specifiedWidth, int specifiedHeight, int priority, ImageReuseInfo reuseInfo) {
        mUrl = url;
        mSpecifiedWidth = specifiedWidth;
        mSpecifiedHeight = specifiedHeight;
        mPriority = priority;
        mImageReuseInfo = reuseInfo;
    }

    public ImageLoadRequest(String url) {
        mUrl = url;
    }

    public int getRequestWidth() {
        if (mSpecifiedWidth != 0) {
            return mSpecifiedWidth;
        }
        return mRequestWidth;
    }

    public ImageLoadRequest setLayoutSize(int w, int h) {
        mRequestWidth = w;
        mRequestHeight = h;
        return this;
    }

    public String getUrl() {
        return mUrl;
    }

    public int getPriority() {
        return mPriority;
    }

    public ImageReuseInfo getImageReuseInfo() {
        return mImageReuseInfo;
    }

    public int getRequestHeight() {
        if (mRequestHeight != 0) {
            return mSpecifiedHeight;
        }
        return mRequestHeight;
    }
}

@@ -691,32 +691,144 @@
 l = url;%0A    %7D%0A%0A
+    public ImageLoadRequest(String url, int priority)%7B%0A        mUrl = url;%0A        mPriority = priority;%0A    %7D%0A%0A
     public int g

add priority construct method