Linear time tree building algorithm from sorted data. Can accept keys and/or values from iterator or stream. This leads to too many parameters, but seems better than alternatives. The four formats that this method accepts are: 1) An iterator of Map.Entries. (it != null, defaultVal == null).
(int size, java.util.Iterator<?> it,
java.io.ObjectInputStream str,
V defaultVal)
| 1606 | * This cannot occur if str is null. |
| 1607 | */ |
| 1608 | private void buildFromSorted(int size, java.util.Iterator<?> it, |
| 1609 | java.io.ObjectInputStream str, |
| 1610 | V defaultVal) |
| 1611 | throws java.io.IOException, ClassNotFoundException { |
| 1612 | |
| 1613 | this.size = size; |
| 1614 | root = buildFromSorted(0, 0, size-1, computeRedLevel(size), |
| 1615 | it, str, defaultVal); |
| 1616 | } // buildFromSorted |
| 1617 | |
| 1618 | /** |
| 1619 | * Recursive "helper method" that does the real work of the |
no test coverage detected