mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 23:39:39 +07:00
testdata for IDEA-152659
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import java.util.*;
|
||||
|
||||
class X<A extends Comparable<A>, B extends Comparable<B>> {
|
||||
|
||||
class Pair implements Comparable<Pair> {
|
||||
A a;
|
||||
B b;
|
||||
|
||||
|
||||
public A getA() {
|
||||
return a;
|
||||
}
|
||||
|
||||
|
||||
public B getB() {
|
||||
return b;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int compareTo(Pair other) {
|
||||
Comparator<Pair> comparator = Comparator.comparing(Pair::getA).thenComparing(Pair::getB);
|
||||
|
||||
return comparator.compare(this, other);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user