Example usage for com.google.common.collect ComparisonChain start

List of usage examples for com.google.common.collect ComparisonChain start

Introduction

In this page you can find the example usage for com.google.common.collect ComparisonChain start.

Prototype

public static ComparisonChain start() 

Source Link

Document

Begins a new chained comparison statement.

Usage

From source file:org.sosy_lab.cpachecker.cpa.arg.graphExport.Edge.java

@Override
public int compareTo(Edge pO) {
    return ComparisonChain.start().compare(source, pO.source).compare(target, pO.target)
            .compare(label, pO.label).result();
}

From source file:com.github.hilcode.versionator.GroupId.java

@Override
public int compareTo(final GroupId other) {
    return ComparisonChain.start().compare(this.value, other.value).result();
}

From source file:com.orion.comparator.ClientSlotComparator.java

/**
 * Compare two <tt>Client</tt> objects according to their slot value
 * /*from   w w w . j av a  2 s  .c  o m*/
 * @author Daniele Pantaleone
 * @return The comparison between the given <tt>Client</tt> objects according to their slot value
 **/
public int compare(Client c1, Client c2) {
    return ComparisonChain.start().compare(c1.getSlot(), c2.getSlot()).compare(c1.getName(), c2.getName())
            .result();
}

From source file:me.yanaga.querydsl.args.core.model.CustomComparableType.java

@Override
public int compareTo(CustomComparableType o) {
    return ComparisonChain.start().compare(this.value, o.value).result();
}

From source file:com.cloudera.fts.crunch.AbstractAttribsRecord.java

@Override
public int compareTo(AbstractAttribsRecord o) {
    return ComparisonChain.start().compare(this.serial_num, o.serial_num).compare(this.seq, o.seq)
            .compare(this.load, o.load).result();
}

From source file:com.zulily.omicron.LogEntry.java

@SuppressWarnings("NullableProblems")
@Override/* w  w  w .  jav  a2s  .  com*/
public int compareTo(LogEntry logEntry) {
    checkNotNull(logEntry, "logEntry");

    return ComparisonChain.start().compare(timestamp, logEntry.timestamp).compare(entryId, logEntry.entryId)
            .result();
}

From source file:com.github.hilcode.versionator.ArtifactId.java

@Override
public int compareTo(final ArtifactId other) {
    return ComparisonChain.start().compare(this.value, other.value).result();
}

From source file:com.orion.comparator.ClientLevelComparator.java

/**
 * Compare two <tt>Client</tt> objects according to their <tt>Group</tt> level
 * // w w w  . j  a va2s  .com
 * @author Daniele Pantaleone
 * @return The comparison between the given <tt>Client</tt> objects according to their <tt>Group</tt> level
 **/
public int compare(Client c1, Client c2) {
    return ComparisonChain.start().compare(c1.getGroup().getLevel(), c2.getGroup().getLevel())
            .compare(c1.getName(), c2.getName()).result();
}

From source file:org.apache.pulsar.client.impl.ConsumerId.java

@Override
public int compareTo(ConsumerId o) {
    return ComparisonChain.start().compare(this.topic, o.topic).compare(this.subscription, o.subscription)
            .result();//from  ww  w .j a v  a 2s .  c om
}

From source file:com.github.hilcode.versionator.maven.Property.java

@Override
public int compareTo(final Property other) {
    return ComparisonChain.start().compare(this.key, other.key).compare(this.value, other.value).result();
}