code: public static <E, T extends Collection<E>> T unmarshallCollection(ObjectInput in, CollectionBuilder<E, T> builder, ElementReader<E> reader) throws IOException, ClassNotFoundException {
        final int size = unmarshallSize(in);
        if (size == NULL_VALUE) {
           return null;
        }
        T collection = Objects.requireNonNull(builder, "CollectionBuilder must be non-null").build(size);
        for (int i = 0; i < size; ++i) {
           //noinspection unchecked
           collection.add(reader.readFrom(in));
        }
        return collection;
     }
docs: Unmarshal a {@link Collection}.
  
  @param in      {@link ObjectInput} to read.
  @param builder {@link CollectionBuilder} builds the concrete {@link Collection} based on size.
  @param reader {@link ElementReader} reads one element from the input.
  @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.