(MatchResult o)
| 659 | } |
| 660 | |
| 661 | @Override |
| 662 | public int compareTo(MatchResult o) { |
| 663 | // Non-varArgs always beats varArgs |
| 664 | int cmp = Boolean.compare(o.isVarArgs(), this.isVarArgs()); |
| 665 | if (cmp == 0) { |
| 666 | cmp = Integer.compare(this.getExactCount(), o.getExactCount()); |
| 667 | if (cmp == 0) { |
| 668 | cmp = Integer.compare(this.getAssignableCount(), o.getAssignableCount()); |
| 669 | if (cmp == 0) { |
| 670 | cmp = Integer.compare(this.getCoercibleCount(), o.getCoercibleCount()); |
| 671 | if (cmp == 0) { |
| 672 | // Fewer var args matches are better |
| 673 | cmp = Integer.compare(o.getVarArgsCount(), this.getVarArgsCount()); |
| 674 | if (cmp == 0) { |
| 675 | // The nature of bridge methods is such that it actually |
| 676 | // doesn't matter which one we pick as long as we pick |
| 677 | // one. That said, pick the 'right' one (the non-bridge |
| 678 | // one) anyway. |
| 679 | cmp = Boolean.compare(o.isBridge(), this.isBridge()); |
| 680 | } |
| 681 | } |
| 682 | } |
| 683 | } |
| 684 | } |
| 685 | return cmp; |
| 686 | } |
| 687 | |
| 688 | @Override |
| 689 | public boolean equals(Object o) { |
nothing calls this directly
no test coverage detected