()
| 813 | } |
| 814 | |
| 815 | public Iterator<Map.Entry<K, V>> iterator() { |
| 816 | Node<K, V> from; |
| 817 | int fromIndex; |
| 818 | if (subMap.hasStart) { |
| 819 | subMap.setFirstKey(); |
| 820 | from = subMap.firstKeyNode; |
| 821 | fromIndex = subMap.firstKeyIndex; |
| 822 | } else { |
| 823 | from = minimum(subMap.backingMap.root); |
| 824 | fromIndex = from != null ? from.left_idx : 0; |
| 825 | } |
| 826 | if (!subMap.hasEnd) { |
| 827 | return new UnboundedEntryIterator<K, V>(subMap.backingMap, from, from == null ? 0 : from.right_idx - fromIndex); |
| 828 | } |
| 829 | subMap.setLastKey(); |
| 830 | Node<K, V> to = subMap.lastKeyNode; |
| 831 | int toIndex = subMap.lastKeyIndex; |
| 832 | return new BoundedEntryIterator<K, V>(from, from == null ? 0 : from.right_idx - fromIndex, subMap.backingMap, to, to == null ? 0 : to.right_idx - toIndex); |
| 833 | } |
| 834 | |
| 835 | @Override |
| 836 | public int size() { |
nothing calls this directly
no test coverage detected