ReferenceLocation.java 1.18 KB
/*
 * Decompiled with CFR 0_118.
 */
package com.day.cq.wcm.siteimporter.internal.resource;

import java.net.URL;

public class ReferenceLocation
implements Comparable<ReferenceLocation> {
    protected int start;
    protected int end;
    protected URL link;
    protected int type;

    public ReferenceLocation(int start, int end, URL link, int type) {
        this.start = start;
        this.end = end;
        this.link = link;
        this.type = type;
    }

    public int getStart() {
        return this.start;
    }

    public int getEnd() {
        return this.end;
    }

    public URL getLink() {
        return this.link;
    }

    public int getType() {
        return this.type;
    }

    public void setStart(int start) {
        this.start = start;
    }

    public void setEnd(int end) {
        this.end = end;
    }

    public void setLink(URL link) {
        this.link = link;
    }

    public void setType(int type) {
        this.type = type;
    }

    @Override
    public int compareTo(ReferenceLocation referenceLocation) {
        if (referenceLocation == null) {
            return -1;
        }
        return referenceLocation.getStart() - this.getStart();
    }
}