53 lines
1.6 KiB
Java
53 lines
1.6 KiB
Java
package com.google.common.collect;
|
|
|
|
/* loaded from: classes.dex */
|
|
public abstract class ComparisonChain {
|
|
private static final ComparisonChain a = new ComparisonChain() { // from class: com.google.common.collect.ComparisonChain.1
|
|
@Override // com.google.common.collect.ComparisonChain
|
|
public int a() {
|
|
return 0;
|
|
}
|
|
|
|
@Override // com.google.common.collect.ComparisonChain
|
|
public ComparisonChain a(Comparable comparable, Comparable comparable2) {
|
|
return a(comparable.compareTo(comparable2));
|
|
}
|
|
|
|
ComparisonChain a(int i) {
|
|
return i < 0 ? ComparisonChain.b : i > 0 ? ComparisonChain.c : ComparisonChain.a;
|
|
}
|
|
};
|
|
private static final ComparisonChain b = new InactiveComparisonChain(-1);
|
|
private static final ComparisonChain c = new InactiveComparisonChain(1);
|
|
|
|
private static final class InactiveComparisonChain extends ComparisonChain {
|
|
final int d;
|
|
|
|
InactiveComparisonChain(int i) {
|
|
super();
|
|
this.d = i;
|
|
}
|
|
|
|
@Override // com.google.common.collect.ComparisonChain
|
|
public int a() {
|
|
return this.d;
|
|
}
|
|
|
|
@Override // com.google.common.collect.ComparisonChain
|
|
public ComparisonChain a(Comparable comparable, Comparable comparable2) {
|
|
return this;
|
|
}
|
|
}
|
|
|
|
public static ComparisonChain e() {
|
|
return a;
|
|
}
|
|
|
|
public abstract int a();
|
|
|
|
public abstract ComparisonChain a(Comparable<?> comparable, Comparable<?> comparable2);
|
|
|
|
private ComparisonChain() {
|
|
}
|
|
}
|