driver-core/src/main/com/mongodb/BasicDBObjectBuilder.java
@SuppressWarnings("unchecked")
    public static BasicDBObjectBuilder start(final Map documentAsMap) {
        BasicDBObjectBuilder builder = new BasicDBObjectBuilder();
        Iterator<Map.Entry> i = documentAsMap.entrySet().iterator();
        while (i.hasNext()) {
            Map.Entry entry = i.next();
            builder.add(entry.getKey().toString(), entry.getValue());
        }
        return builder;
    }
@SuppressWarnings("unchecked")
    public static BasicDBObjectBuilder start(final Map documentAsMap) {
        BasicDBObjectBuilder builder = new BasicDBObjectBuilder();
        Iterator<Map.Entry> i = documentAsMap.entrySet().iterator();
        while (i.hasNext()) {
            Map.Entry entry = i.next();
            builder.add(entry.getKey().toString(), entry.getValue());
        }
        return builder;
    }
Creates an object builder from an existing map of key value pairs.

@param documentAsMap a document in Map form.
@return the new builder