()
| 931 | } |
| 932 | |
| 933 | @Override |
| 934 | public Iterator<V> iterator() { |
| 935 | Node<K, V> from; |
| 936 | int fromIndex; |
| 937 | if (subMap.hasStart) { |
| 938 | subMap.setFirstKey(); |
| 939 | from = subMap.firstKeyNode; |
| 940 | fromIndex = subMap.firstKeyIndex; |
| 941 | } else { |
| 942 | from = minimum(subMap.backingMap.root); |
| 943 | fromIndex = from != null ? from.left_idx : 0; |
| 944 | } |
| 945 | if (!subMap.hasEnd) { |
| 946 | return new UnboundedValueIterator<K, V>(subMap.backingMap, from, |
| 947 | from == null ? 0 : from.right_idx - fromIndex); |
| 948 | } |
| 949 | subMap.setLastKey(); |
| 950 | Node<K, V> to = subMap.lastKeyNode; |
| 951 | int toIndex = subMap.lastKeyIndex; |
| 952 | return new BoundedValueIterator<K, V>(from, |
| 953 | from == null ? 0 : from.right_idx - fromIndex, subMap.backingMap, to, |
| 954 | to == null ? 0 : to.right_idx - toIndex); |
| 955 | } |
| 956 | |
| 957 | @Override |
| 958 | public int size() { |
nothing calls this directly
no test coverage detected