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

Method iterator

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

Source from the content-addressed store, hash-verified

895 }
896
897 public Iterator<K> iterator() {
898 Node<K, V> from;
899 int fromIndex;
900 if (subMap.hasStart) {
901 subMap.setFirstKey();
902 from = subMap.firstKeyNode;
903 fromIndex = subMap.firstKeyIndex;
904 } else {
905 from = minimum(subMap.backingMap.root);
906 fromIndex = from != null ? from.left_idx : 0;
907 }
908 if (!subMap.hasEnd) {
909 return new UnboundedKeyIterator<K, V>(subMap.backingMap, from,
910 from == null ? 0 : from.right_idx - fromIndex);
911 }
912 subMap.setLastKey();
913 Node<K, V> to = subMap.lastKeyNode;
914 int toIndex = subMap.lastKeyIndex;
915 return new BoundedKeyIterator<K, V>(from,
916 from == null ? 0 : from.right_idx - fromIndex, subMap.backingMap, to,
917 to == null ? 0 : to.right_idx - toIndex);
918 }
919 }
920
921 static class SubMapValuesCollection <K,V> extends AbstractCollection<V> {

Callers

nothing calls this directly

Calls 3

setFirstKeyMethod · 0.80
minimumMethod · 0.80
setLastKeyMethod · 0.80

Tested by

no test coverage detected