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

Method iterator

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

setFirstKeyMethod · 0.80
minimumMethod · 0.80
setLastKeyMethod · 0.80

Tested by

no test coverage detected