@Override public int compareTo( Tuple4<T1, T2, T3, T4> that ) { if (that == this) return 0; int diff = compareValues(this.v1, that.v1); if (diff != 0) return diff; diff = compareValues(this.v2, that.v2); if (diff != 0) return diff; diff = compareValues(this.v3, that.v3); if (diff != 0) return diff; return compareValues(this.v4, that.v4); }
@Override public int compareTo( TupleN that ) { if (that == this) return 0; int diff = this.values.length - that.values.length; if (diff != 0) return diff; for (int i = 0; i != values.length; ++i) { diff = compareValues(this.values[i], that.values[i]); if (diff != 0) return diff; } return 0; }
@Override public int compareTo( Tuple4<T1, T2, T3, T4> that ) { if (that == this) return 0; int diff = compareValues(this.v1, that.v1); if (diff != 0) return diff; diff = compareValues(this.v2, that.v2); if (diff != 0) return diff; diff = compareValues(this.v3, that.v3); if (diff != 0) return diff; return compareValues(this.v4, that.v4); }
@Override public int compareTo( Tuple2<T1, T2> that ) { if (that == this) return 0; int diff = compareValues(this.v1, that.v1); if (diff != 0) return diff; return compareValues(this.v2, that.v2); }
@Override public int compareTo( Tuple3<T1, T2, T3> that ) { if (that == this) return 0; int diff = compareValues(this.v1, that.v1); if (diff != 0) return diff; diff = compareValues(this.v2, that.v2); if (diff != 0) return diff; return compareValues(this.v3, that.v3); }
@Override public int compareTo( TupleN that ) { if (that == this) return 0; int diff = this.values.length - that.values.length; if (diff != 0) return diff; for (int i = 0; i != values.length; ++i) { diff = compareValues(this.values[i], that.values[i]); if (diff != 0) return diff; } return 0; }
@Override public int compareTo( Tuple2<T1, T2> that ) { if (that == this) return 0; int diff = compareValues(this.v1, that.v1); if (diff != 0) return diff; return compareValues(this.v2, that.v2); }
@Override public int compareTo( Tuple3<T1, T2, T3> that ) { if (that == this) return 0; int diff = compareValues(this.v1, that.v1); if (diff != 0) return diff; diff = compareValues(this.v2, that.v2); if (diff != 0) return diff; return compareValues(this.v3, that.v3); }