Example usage for org.apache.commons.lang.builder CompareToBuilder appendSuper

List of usage examples for org.apache.commons.lang.builder CompareToBuilder appendSuper

Introduction

In this page you can find the example usage for org.apache.commons.lang.builder CompareToBuilder appendSuper.

Prototype

public CompareToBuilder appendSuper(int superCompareTo) 

Source Link

Document

Appends to the builder the compareTo(Object) result of the superclass.

Usage

From source file:uk.ac.ebi.embl.api.entry.reference.Article.java

public int compareTo(Article o) {
    final Article other = (Article) o;
    final CompareToBuilder builder = new CompareToBuilder();
    builder.appendSuper(super.compareTo(other));
    builder.append(this.firstPage, other.firstPage);
    builder.append(this.lastPage, other.lastPage);
    builder.append(this.volume, other.volume);
    builder.append(this.issue, other.issue);
    builder.append(this.journal, other.journal);
    builder.append(this.year, other.year);
    return builder.toComparison();
}

From source file:uk.ac.ebi.embl.api.entry.reference.Book.java

public int compareTo(Book o) {
    final Book other = (Book) o;
    final CompareToBuilder builder = new CompareToBuilder();
    builder.appendSuper(super.compareTo(other));
    builder.append(this.bookTitle, other.bookTitle);
    builder.append(this.firstPage, other.firstPage);
    builder.append(this.lastPage, other.lastPage);
    builder.append(this.publisher, other.publisher);
    builder.append(this.year, other.year);
    Person[] thisEditors = this.editors.toArray(new Person[this.editors.size()]);
    Person[] otherEditors = other.editors.toArray(new Person[other.editors.size()]);
    builder.append(thisEditors, otherEditors);
    return builder.toComparison();
}

From source file:uk.ac.ebi.embl.api.entry.reference.ElectronicReference.java

public int compareTo(ElectronicReference o) {
    final ElectronicReference other = (ElectronicReference) o;
    final CompareToBuilder builder = new CompareToBuilder();
    builder.appendSuper(super.compareTo(other));
    builder.append(this.text, other.text);
    return builder.toComparison();
}

From source file:uk.ac.ebi.embl.api.entry.reference.Patent.java

public int compareTo(Patent o) {
    final Patent other = o;
    final CompareToBuilder builder = new CompareToBuilder();
    builder.appendSuper(super.compareTo(other));
    builder.append(this.patentOffice, other.patentOffice);
    builder.append(this.patentNumber, other.patentNumber);
    builder.append(this.patentType, other.patentType);
    builder.append(this.sequenceNumber, other.sequenceNumber);
    builder.append(this.day, other.day);
    String[] thisApplicants = this.applicants.toArray(new String[this.applicants.size()]);
    String[] otherApplicants = other.applicants.toArray(new String[this.applicants.size()]);
    builder.append(thisApplicants, otherApplicants);
    return builder.toComparison();
}

From source file:uk.ac.ebi.embl.api.entry.reference.Submission.java

public int compareTo(Submission o) {
    final Submission other = o;
    final CompareToBuilder builder = new CompareToBuilder();
    builder.appendSuper(super.compareTo(other));
    builder.append(this.day, other.day);
    builder.append(this.submitterAddress, other.submitterAddress);
    return builder.toComparison();
}

From source file:uk.ac.ebi.embl.api.entry.reference.Thesis.java

public int compareTo(Thesis o) {
    final Thesis other = o;
    final CompareToBuilder builder = new CompareToBuilder();
    builder.appendSuper(super.compareTo(other));
    builder.append(this.institute, other.institute);
    builder.append(this.year, other.year);
    return builder.toComparison();
}

From source file:uk.ac.ebi.embl.api.entry.reference.Unpublished.java

public int compareTo(Unpublished o) {
    final Unpublished other = o;
    final CompareToBuilder builder = new CompareToBuilder();
    builder.appendSuper(super.compareTo(other));
    return builder.toComparison();
}