code: @SuppressWarnings({ "unchecked", "rawtypes" })
  	protected void encode(BsonWriter writer, Collection<?> coll, EncoderContext encoderContext) {
  		writer.writeStartArray();
  		Iterator<?> iterator = coll.iterator();
  		while(iterator.hasNext()) {
  			Object next = iterator.next();
  			if (next == null) {
  				writer.writeNull();
  			} else {
  				Codec codec = registry.get(next.getClass());
  				encoderContext.encodeWithChildContext(codec, writer, next);
  			}
  		}
  		writer.writeEndArray();
  	}
docs: To be used if and only if it belongs to {@link java.util} package
  @param writer
  @param coll
  @param encoderContext