()
| 3949 | private transient Comparator<? super K> comparator; |
| 3950 | |
| 3951 | @SuppressWarnings("unchecked") |
| 3952 | @Override |
| 3953 | public Comparator<? super K> comparator() { |
| 3954 | Comparator<? super K> result = comparator; |
| 3955 | if (result == null) { |
| 3956 | Comparator<? super K> forwardCmp = forward().comparator(); |
| 3957 | if (forwardCmp == null) { |
| 3958 | forwardCmp = (Comparator) Ordering.natural(); |
| 3959 | } |
| 3960 | result = comparator = reverse(forwardCmp); |
| 3961 | } |
| 3962 | return result; |
| 3963 | } |
| 3964 | |
| 3965 | // If we inline this, we get a javac error. |
| 3966 | private static <T> Ordering<T> reverse(Comparator<T> forward) { |
nothing calls this directly
no test coverage detected