private void buildFromSorted(final int size, final Iterator<?> it, final java.io.ObjectInputStream str, final V defaultVal)
      throws java.io.IOException, ClassNotFoundException {
    setSize(size);
    root = buildFromSorted(0, 0, size - 1, computeRedLevel(size), it, str, defaultVal);
  }
private void buildFromSorted ( final int size , final Iterator < ? > it , final java . io . ObjectInputStream str , final V defaultVal ) throws java . io . IOException , ClassNotFoundException { setSize ( size ) ; root = buildFromSorted ( 0 , 0 , size - 1 , computeRedLevel ( size ) , it , str , defaultVal ) ; }
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). 2) An iterator of keys. (it != null, defaultVal != null). 3) A
stream of alternating serialized keys and values. (it == null, defaultVal == null). 4) A stream of serialized keys. (it ==
null, defaultVal != null).

It is assumed that the comparator of the OMVRBTree is already set prior to calling this method.

@param size
the number of keys (or key-value pairs) to be read from the iterator or stream
@param it
If non-null, new entries are created from entries or keys read from this iterator.
@param str
If non-null, new entries are created from keys and possibly values read from this stream in serialized form. Exactly
one of it and str should be non-null.
@param defaultVal
if non-null, this default value is used for each value in the map. If null, each value is read from iterator or
stream, as described above.
@throws IOException
propagated from stream reads. This cannot occur if str is null.
@throws ClassNotFoundException
propagated from readObject. This cannot occur if str is null.