RevRepEntry.java 1.2 KB
/*
 * Decompiled with CFR 0_118.
 */
package com.day.cq.replication.impl;

import com.day.cq.replication.ReverseReplication;

public class RevRepEntry
implements Comparable<RevRepEntry> {
    final ReverseReplication replication;
    boolean success;
    long lastModified;

    RevRepEntry(ReverseReplication replication) {
        this.replication = replication;
    }

    @Override
    public int compareTo(RevRepEntry o) {
        return Long.valueOf(this.lastModified - o.lastModified).intValue();
    }

    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || this.getClass() != o.getClass()) {
            return false;
        }
        RevRepEntry that = (RevRepEntry)o;
        if (this.lastModified != that.lastModified) {
            return false;
        }
        if (this.success != that.success) {
            return false;
        }
        return this.replication.equals(that.replication);
    }

    public int hashCode() {
        int result = this.replication.hashCode();
        result = 31 * result + (this.success ? 1 : 0);
        result = 31 * result + (int)(this.lastModified ^ this.lastModified >>> 32);
        return result;
    }
}