code: public static <E, T extends Collection<E>> T unmarshallCollection(ObjectInput in, CollectionBuilder<E, T> builder) throws IOException, ClassNotFoundException {
        return unmarshallCollection(in, builder, input -> (E) input.readObject());
     }
docs: Unmarshal a {@link Collection}.
  
  @param in      {@link ObjectInput} to read.
  @param builder {@link CollectionBuilder} builds the concrete {@link Collection} based on size.
  @param <E>     Collection's element type.
  @param <T>     {@link Collection} implementation.
  @return The concrete {@link Collection} implementation.
  @throws IOException            If any of the usual Input/Output related exceptions occur.
  @throws ClassNotFoundException If the class of a serialized object cannot be found.