MCPcopy Index your code
hub / github.com/davidgiven/luje / iterator

Method iterator

lib/java/util/TreeMap.java:933–955  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 3

setFirstKeyMethod · 0.80
minimumMethod · 0.80
setLastKeyMethod · 0.80

Tested by

no test coverage detected